fix: Additional salary processing
This commit is contained in:
parent
343143037c
commit
493029195c
@ -647,10 +647,13 @@ class SalarySlip(TransactionBase):
|
||||
continue
|
||||
|
||||
if (
|
||||
(not d.additional_salary
|
||||
and (not additional_salary or additional_salary.overwrite))
|
||||
or (additional_salary
|
||||
and additional_salary.name == d.additional_salary)
|
||||
(
|
||||
not d.additional_salary
|
||||
and (not additional_salary or additional_salary.overwrite)
|
||||
) or (
|
||||
additional_salary
|
||||
and additional_salary.name == d.additional_salary
|
||||
)
|
||||
):
|
||||
component_row = d
|
||||
break
|
||||
@ -679,8 +682,12 @@ class SalarySlip(TransactionBase):
|
||||
|
||||
if additional_salary:
|
||||
component_row.is_recurring_additional_salary = is_recurring
|
||||
component_row.default_amount = 0
|
||||
component_row.additional_amount = amount
|
||||
if additional_salary.overwrite:
|
||||
component_row.additional_amount = flt(flt(amount) - flt(component_row.get("default_amount", 0)),
|
||||
component_row.precision("additional_amount"))
|
||||
else:
|
||||
component_row.default_amount = 0
|
||||
component_row.additional_amount = amount
|
||||
component_row.additional_salary = additional_salary.name
|
||||
component_row.deduct_full_tax_on_selected_payroll_date = \
|
||||
additional_salary.deduct_full_tax_on_selected_payroll_date
|
||||
|
Loading…
x
Reference in New Issue
Block a user