File tree Expand file tree Collapse file tree
hrms/payroll/doctype/gratuity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,16 +264,11 @@ def get_total_component_amount(self) -> float:
264264 if not salary_slip :
265265 frappe .throw (_ ("No Salary Slip found for Employee: {0}" ).format (bold (self .employee )))
266266
267- # consider full payment days for calculation as last month's salary slip
268- # might have less payment days as per attendance, making it non-deterministic
269- salary_slip .payment_days = salary_slip .total_working_days
270- salary_slip .calculate_net_pay ()
271-
272267 total_amount = 0
273268 component_found = False
274269 for row in salary_slip .earnings :
275270 if row .salary_component in applicable_earning_components :
276- total_amount += flt (row .amount )
271+ total_amount += flt (row .default_amount )
277272 component_found = True
278273
279274 if not component_found :
You can’t perform that action at this time.
0 commit comments