Calculation in case of Tax Inclusive Item Price and Additional Discount on Grand Total

In this article, we will explain how ERPNext calculates net item price and net tax amount, if tax is included in the item price and there is an additional discount on grand total.

Example: Let's say, an item costs $100 with a tax rate of 10%, the customer still pays a flat $100, of which $9.09 is collected as tax. And consider there are shipping charges as well in the invoice which is 20% of the total amount.

So, the grand total for the invoice becomes $120.

Now, let's say, we gave an additional discount of $30 on grand total to the customer. So, the grand total after the discount will be $90.

In this case, the invoice will look like below:

invoice inclusive tax and additional discount

Let's understand how the system calculated the amounts internally. We will explain the calculation in 2 steps.

Step1: Calculation without additional discount

First, the system calculates the "Net Amount" for items, which is the amount exclusive of the tax amount.

Net Amount = 100 * 100 / (100 + 10) = 90.91
VAT = 100 * 10 / (100 + 10) = 9.09
Total Amount (with VAT) = 100
Shipping Charges = 100 * 20 / 100 = 20
Grand Total = 120

Step2: Calculation with additional discount

Then, the system applies an additional discount of $30 on the grand total of $120, which means the applied discount is distributed proportionately between item's net amount and the taxes.

Net Amount = 90.91 - (30 * 90.91 / 120) = 90.91 - 22.73 = 68.18
VAT = 9.09 - (30 * 9.09 / 120) = 9.09 - 2.27 = 6.82
Shipping Charges = 20 - (30 * 20 / 120) = 20 - 5 = 15
Grand Total = 68.18 + 6.82 + 15 = 90
Was this article helpful?