minor fix

This commit is contained in:
Wilson Gómez 2020-12-15 09:24:38 -05:00
parent c0cf59f2d0
commit a0d5a0ba1c
2 changed files with 12 additions and 12 deletions

View File

@ -14,7 +14,6 @@ import account
def register():
Pool.register(
uvt.UvtWithholding,
employee.Employee,
employee.MandatoryWage,
position.Position,
@ -22,6 +21,7 @@ def register():
payroll.Payroll,
payroll.PayrollLine,
configuration.Configuration,
uvt.UvtWithholding,
payroll.PayrollGlobalStart,
payroll.PayrollPaymentStart,
payroll.PayrollPaycheckStart,

22
uvt.py
View File

@ -27,17 +27,17 @@ class UvtWithholding(ModelSQL, ModelView):
def __setup__(cls):
super(UvtWithholding, cls).__setup__()
@classmethod
def __register__(cls, module_name):
table = cls.__table_handler__(module_name)
cursor = Transaction().connection.cursor()
# Migration: Remove old column
uvt_salary_exist = table.column_exist('uvt_salary')
if not uvt_salary_exist:
return
cursor.execute('ALTER TABLE staff_payroll_uvt_withholding DROP COLUMN uvt_salary')
# @classmethod
# def __register__(cls, module_name):
# table = cls.__table_handler__(module_name)
# cursor = Transaction().connection.cursor()
#
# # Migration: Remove old column
# uvt_salary_exist = table.column_exist('uvt_salary')
# if not uvt_salary_exist:
# return
#
# cursor.execute('ALTER TABLE staff_payroll_uvt_withholding DROP COLUMN uvt_salary')
@classmethod
def compute_withholding(cls, payment):