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

Salary Slip Rounding in v11


Dear colleagues,

in v10, in a normal configuration, deductions were calculated with full currency precision and then only the final net salary was rounded to no decimals. Now in v11 I observe that each deduction item is rounded to no decimals. I have checked the currency precision and it is 2 decimal places. Also, I have checked the individual form, it had no precision setting. Changin this to fixed 2 decimal places had no impact on new salary slips.


How can I achieve to get deductions (and optimally also net salary) to full currency precision?


@lasalesi sounds like what I just found…

Specifically changing

amount = rounded(frappe.safe_eval(formula, self.whitelisted_globals, data))

back to

amount = frappe.safe_eval(formula, self.whitelisted_globals, data)

sorted out the rounding for me as far as I could tell.