Commit 180fdb1 1 parent 0906abb commit 180fdb1 Copy full SHA for 180fdb1
File tree 1 file changed +6
-2
lines changed
hrms/payroll/report/income_tax_computation
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -421,12 +421,16 @@ def get_applicable_tax(self):
421
421
tax_slab = emp_details .get ("income_tax_slab" )
422
422
if tax_slab :
423
423
tax_slab = frappe .get_cached_doc ("Income Tax Slab" , tax_slab )
424
- employee_dict = frappe .get_doc ("Employee" , emp ).as_dict ()
424
+ salary_slip = frappe .new_doc ("Salary Slip" )
425
+ salary_slip .employee = emp
426
+ salary_slip .salary_structure = emp_details .salary_structure
427
+ salary_slip .process_salary_structure ()
428
+ eval_locals , __ = salary_slip .get_data_for_eval ()
425
429
tax_amount = calculate_tax_by_tax_slab (
426
430
emp_details ["total_taxable_amount" ],
427
431
tax_slab ,
428
432
eval_globals = None ,
429
- eval_locals = employee_dict ,
433
+ eval_locals = eval_locals ,
430
434
)
431
435
else :
432
436
tax_amount = 0.0
You can’t perform that action at this time.
0 commit comments