fix: component amount calculation based on formula with abbr not working (#25117)

This commit is contained in:
Rucha Mahabal 2021-04-02 17:00:28 +05:30 committed by GitHub
parent 7535341016
commit 2453b0cf6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -618,13 +618,16 @@ class SalarySlip(TransactionBase):
component_row = self.append(component_type)
for attr in (
'depends_on_payment_days', 'salary_component', 'abbr'
'depends_on_payment_days', 'salary_component',
'do_not_include_in_total', 'is_tax_applicable',
'is_flexible_benefit', 'variable_based_on_taxable_salary',
'exempted_from_income_tax'
):
component_row.set(attr, component_data.get(attr))
abbr = component_data.get('abbr') or component_data.get('salary_component_abbr')
component_row.set('abbr', abbr)
if additional_salary:
component_row.default_amount = 0
component_row.additional_amount = amount

View File

@ -100,7 +100,7 @@ class SalaryStructure(Document):
from_date=from_date, base=base, variable=variable, income_tax_slab=income_tax_slab)
else:
assign_salary_structure_for_employees(employees, self,
payroll_payable_account=payroll_payable_account,
payroll_payable_account=payroll_payable_account,
from_date=from_date, base=base, variable=variable, income_tax_slab=income_tax_slab)
else:
frappe.msgprint(_("No Employee Found"))