ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Salary slip wrong net pay calculation?


#1

There seems to be some mistake in the way that the net pay is being calculated on the salary slip.
If all components already have depends on leave without pay checked, they are calculated based on working days in the Salary Detail table itself.

In the net pay formula, it seems the amount is again being multiplied by payment days/ total working days

self.net_pay = (flt(self.gross_pay) - (flt(self.total_deduction) + flt(self.total_loan_repayment))) * flt(self.payment_days / self.total_working_days)


#2

Where did you see this code?