ERPNext.com Frappe Cloud Support Partners Foundation

Discounts on Sales Invoice

Hi,
I am wondering on how the system is calculating the values in Sales Invoice. Here is the invoice data:

Item Qty: 6
Item Rate: 362.75
Net Amount: 2,176.5

There is as:
Type: On Net Total
Rate: 10%
Is Tax Included in the Base Rate: Yes (ticked)

There is Additional Discount as:
10% On Net Total

I would like to show all the details in the invoice printout as below:

Items Table
Item, Qty, Rate, Amount

Summary
(a) Total Amount Excluding Tax: xxx (Sum of amounts in Items Table)
(b) GST 10%: xxx
© Subtotal: xxx (a+b)
(d) Discount 10%: xxx
(e) Net Amount: (c-d)

Currently, there is no print format to show properly and I couldn’t figure out how the discounts are calculated in this scenario. I have the following figures showing in the system:

Total: 2,176.5
Net Total: 1,780.772
GST: 178.077
Discount: 197.864

I couldn’t figure out how the system is calculating the discounts and GST as 10% doesn’t make up the values. I have attached the screenshots of the same.

Can anyone explain how the system calculates discount and taxes in the sales invoice.

It would depend on the Sales Invoice Settings.

If the Discout is set to use “Net Total” then the discount is taken against the net total and then sales taxes are applied to the new total after discount.

If the Discount is set to use the Grand Total, then the invoice is completed with taxes and the Discount is taken from the total after taxes.

Sometimes there will be Regional settings that can alter this function for different parts of the world.

BKM

Thanks #bkm,
Can you please check the invoice screenshots, I am unable to understand the calculation involved.

Ok, Here is how I think the calculation is going (because I get the same numbers), but it will be up to you to determine if this is correct for your location taxes:

  • We know the GST taxes are built into the displayed price of each item because it says so in the second screenshot (the blue check box).
  • The total of 6 items at a tax loaded rate of 362.75 equals 2176.5
  • This loaded net total is then discounted by 10% to equal 1958.85
  • To get the actual 10% GST of the new discounted, tax loaded total we divide the 1958.85 by 11 to get a GST tax of 178.077
  • if we now subtract the (10%GST) 178.077 from the tax loaded total we get the actual Net Total of 1780.773

This is how the numbers were calculated. My calculator did some rounding so I am off by .001 on the actual Net Total but you get the idea.

So the discount is taken from the total of the items and then the GST is calculated from this new discounted number.

Right or wrong, this is what appears to be happening.

Hope this helps :sunglasses:

BKM

Thanks @bkm,
It’s helpful, however, still the following step I couldn’t understand:

To get the actual 10% GST of the new discounted, tax loaded total we divide the 1958.85 by 11 to get a GST tax of 178.077

Can you please help me understand this one too.

Thank you in advance.

Sure…

To get 10% of anything you would divide by 10 and the result would be 10% of the original number. So for example, if the cost was 10 and you wanted to find 10% of 10 you would dived the number 10 by 10 and the result is 1.

But the GST pricing model says that the 10% tax is already built into the price. This means the displayed price would have to be 10 + 1 or 11.

This makes it simple to find the 10%GST tax of any item. You just need to divide by 11 to get the tax amount.

If the GST tax were set to anything other than 10% this calculation would not work. The calculation would be a bit more complicated, but the process would be similar. This is probably why they chose to use 10% as the builtin tax so that anyone with a simple calculator could easily figure out the actual price of an item with the tax built in. The 10% number just makes the math easier (even for government officials).

Hope this helps. :sunglasses:

BKM

Thanks @bkm,
Makes perfect sense, I got the whole idea. I just posted the sample invoice, however in my case it’s not 10%, it’s either 17% or 20% depending on the National Tax Registration Type, meaning it would be very complicated for me to explain in case of any query.