Amount per item row issue

hello , if i create a sales invoice and add multiples items along with their quantities and discount per item as the image below, the numbers calculated are wrong because if we do it manually it will give other results

so 1st line should be equal to 53.55
2nd line should be 53.55
3rd line should be 33.15 and it is correct

and the total would be 140.25
and discount amount should be 24.75
basically the problem is if the number is 53.546 it makes it 53.55
any idea of where i can change it , i need the number to be taken as it is with 2 decimals it’s critical because it makes the numbers wrong


Its because your Rounded Total might be enabled… you can go to global settings and check its enabled or not. check the Disable Rounded Total setting and then if you go to system settings you can see Float Precision under DATE AND NUMBER FORMAT… adjust according to your needs. it will be fine then…

Thank you

1 Like

thanks for your reply, i have it checked in global defaults and in system settings i have this number format #,###.### with precision float 2 and currency precision 2 and still have the same issue


I don’t how you got 53.55?

=4*13.39 = 53.56 right???


1 Like

this is because you see the price directly discounted calculated, the original price for item row 1 from price list is equal to Screenshot%20(120) as in this screenshot which is 15.75 so you have now 15% discount on 4 items and each is 15.75
so 15.75 - (15.75*0.15) = 13.3875 (ERPnext take this number and put it as 13.39) which is the price of each item with discount for item row 1
4 * 13.3875 = 53.55
so it’s right you chose 15% discount but it’s like with what ERPnext is omitting from numbers if you calculate the discount from a formula it’s like you did a 14.99% discount and not 15%

got it fixed after changing precision of Rate in sales invoice doctype to 3 instead of 2.
Same goes for tax_amount but with a precision of 2 , also the total to a precision of 2 in taxes and charges form (needed to change it for the tax amount because on print out it was showing 4 decimals) , and somehow in print format wasn’t able to use {{ frappe.utils.flt(tax_amount,2) }} if the tax was 28.3436 it was showing it when i add this line as 28.3436 0 it was adding a zero at the end with a space, couldn’t make it look as 28.34 except from sales and charges doctypes precision changes.