fix: Test Case

This commit is contained in:
Deepesh Garg 2020-12-30 14:06:13 +05:30
parent 8b7ebe5044
commit 97d055dfc3
2 changed files with 5 additions and 2 deletions

View File

@ -1163,7 +1163,7 @@ class SalarySlip(TransactionBase):
'end_date' : ['<', self.start_date]
})
year_to_date = flt(salary_slip_sum[0].sum) if salary_slip_sum else 0.0
month_to_date = flt(salary_slip_sum[0].sum) if salary_slip_sum else 0.0
month_to_date += self.net_pay
self.month_to_date = month_to_date

View File

@ -155,7 +155,10 @@ def create_salary_structure_assignment(employee, salary_structure, from_date=Non
if not payroll_period:
payroll_period = create_payroll_period()
income_tax_slab = create_tax_slab(payroll_period, allow_tax_exemption=True, currency=currency)
income_tax_slab = frappe.db.get_value("Income Tax Slab", {"currency": currency})
if not income_tax_slab:
income_tax_slab = create_tax_slab(payroll_period, allow_tax_exemption=True, currency=currency)
salary_structure_assignment = frappe.new_doc("Salary Structure Assignment")
salary_structure_assignment.employee = employee