modify check limit to tax withholding
This commit is contained in:
parent
f128cce375
commit
b3603bf164
24
payroll.py
24
payroll.py
|
@ -765,15 +765,21 @@ class Payroll(metaclass=PoolMeta):
|
|||
) else None
|
||||
lim_uvt = LIM_UVT_DEDUCTIBLE[field] if field in LIM_UVT_DEDUCTIBLE.keys(
|
||||
) else None
|
||||
res = value_field
|
||||
if lim_uvt:
|
||||
value_limit_uvt = uvt_config * lim_uvt
|
||||
if value_field > value_limit_uvt:
|
||||
res = value_limit_uvt
|
||||
if lim_percent:
|
||||
value_limit_percent = base * lim_percent / 100
|
||||
if value_field > value_limit_percent:
|
||||
res = value_limit_percent
|
||||
res = 0
|
||||
if field == 'dependents' and value_field:
|
||||
value_percent = lim_percent * value_field * base
|
||||
value_uvt = lim_uvt * uvt_config
|
||||
res = min(value_percent, value_uvt)
|
||||
else:
|
||||
res = value_field
|
||||
if lim_uvt:
|
||||
value_limit_uvt = uvt_config * lim_uvt
|
||||
if value_field > value_limit_uvt:
|
||||
res = value_limit_uvt
|
||||
if lim_percent:
|
||||
value_limit_percent = base * lim_percent / 100
|
||||
if value_field > value_limit_percent:
|
||||
res = value_limit_percent
|
||||
return res
|
||||
|
||||
def _compute_line_tax(self, line_tax):
|
||||
|
|
Loading…
Reference in New Issue