Salary slip - throw if no default flexi component

This commit is contained in:
Jamsheer 2018-05-16 12:16:18 +05:30
parent 5f6e274505
commit c678d037e7

View File

@ -88,6 +88,8 @@ class SalarySlip(TransactionBase):
payroll_period_days = get_payroll_period_days(self.start_date, self.end_date, self.company)
amount = get_amount(payroll_period_days, self.start_date, self.end_date, max_benefits)
self.update_component_row(flexi_struct_row, amount, "earnings")
else:
frappe.throw(_("Configure default flexible benefit salary component for apply pro-rata benefit"))
def create_flexi_struct_row(self, default_flexi_compenent):
salary_component = frappe.get_doc("Salary Component", default_flexi_compenent)