mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
fix: local variable 'benefit_amount' referenced before assignment (#20949)
This commit is contained in:
@@ -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",
|
component_max_benefit, depends_on_payment_days = frappe.db.get_value("Salary Component",
|
||||||
salary_component, ["max_benefit_amount", "depends_on_payment_days"])
|
salary_component, ["max_benefit_amount", "depends_on_payment_days"])
|
||||||
|
|
||||||
|
benefit_amount = 0
|
||||||
if benefit_application:
|
if benefit_application:
|
||||||
benefit_amount = frappe.db.get_value("Employee Benefit Application Detail",
|
benefit_amount = frappe.db.get_value("Employee Benefit Application Detail",
|
||||||
{"parent": benefit_application[0][0], "earning_component": salary_component}, "amount")
|
{"parent": benefit_application[0][0], "earning_component": salary_component}, "amount")
|
||||||
|
|||||||
Reference in New Issue
Block a user