fix: local variable 'benefit_amount' referenced before assignment (#20948)

This commit is contained in:
Anurag Mishra
2020-03-16 13:47:47 +05:30
committed by GitHub
parent 08f0e9d6f3
commit 97dfe2ac32

View File

@@ -190,6 +190,7 @@ def get_benefit_component_amount(employee, start_date, end_date, salary_componen
component_max_benefit, depends_on_payment_days = frappe.db.get_value("Salary Component",
salary_component, ["max_benefit_amount", "depends_on_payment_days"])
benefit_amount = 0
if benefit_application:
benefit_amount = frappe.db.get_value("Employee Benefit Application Detail",
{"parent": benefit_application[0][0], "earning_component": salary_component}, "amount")