Tax calculation types
The Type field on a row of a Sales Taxes and Charges Template or Purchase Taxes and Charges Template decides the base that ERPNext uses to calculate the row. The same Tax Rate of 5 can mean 5%, or 5 per unit, depending on the type.
Types
| Type | Formula | Typical use |
|---|---|---|
| Actual | The amount that you enter in Amount | A fixed shipping or documentation charge |
| On Net Total | Net Total × Tax Rate ÷ 100 | A standard percentage tax |
| On Previous Row Amount | Amount of the referenced row × Tax Rate ÷ 100 | A surcharge on another tax |
| On Previous Row Total | Total of the referenced row × Tax Rate ÷ 100 | A tax on the subtotal after an earlier row |
| On Item Quantity | Total item quantity × Tax Rate | A fixed charge per unit |
Examples
The examples use a Net Total of 1,000.
Actual
A fixed shipping charge of 25: the row Amount is 25 and the running Total is 1,025. ERPNext ignores the Tax Rate for an Actual row.
On Net Total
A rate of 8: 1,000 × 8 ÷ 100 = 80. The running Total is 1,080.
On Previous Row Amount and On Previous Row Total
Row 1 is 8% On Net Total. Row 2 is 2% with Reference Row # 1:
| Row 2 type | Base from row 1 | Row 2 amount | Grand Total |
|---|---|---|---|
| On Previous Row Amount | Amount: 80 | 1.60 | 1,081.60 |
| On Previous Row Total | Total: 1,080 | 21.60 | 1,101.60 |
On Item Quantity
With 5 units in total and a Tax Rate of 2: 5 × 2 = 10. The rate is an amount per unit in the document currency, not a percentage. Check the units of measure and conversion factors of the items.
Amount and Total columns
| Column | Meaning |
|---|---|
| Amount | The tax or charge of this row alone |
| Total | The running total of the document after this row |
| Net Amount | The base that the row used. For a previous-row type, the referenced row's Amount or Total. |
On Previous Row Amount uses the Amount of the referenced row. On Previous Row Total uses its Total.
Rules for Reference Row
- Reference Row # is shown and allowed only for On Previous Row Amount and On Previous Row Total.
- The first row cannot use a previous-row type.
- The reference must point to an earlier row.
- Each row has one reference. To tax a combination of several rows, reference the row whose running Total contains them.
- Reference Row # stores a row number. When you insert, delete, or move rows, check every reference again.
Related fields
The type decides how the amount is calculated. Two other fields decide how the amount is used:
- Is this Tax included in Basic Rate? takes the tax out of a tax-inclusive item rate instead of adding it. See Tax-inclusive pricing.
- Consider Tax or Charge for (purchase rows only) decides whether the amount changes the supplier total, the stock valuation, or both. See Include tax in valuation or total.
Errors
| Message | Cause | Fix |
|---|---|---|
| Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total' | A row of another type has a Reference Row # | Clear the reference or change the type. |
| Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row | The first row uses a previous-row type | Move a base row above it. |
| Please specify a valid Row ID for row ... in table ... | A previous-row type has no Reference Row # | Enter the earlier row number. |
| Cannot refer row number greater than or equal to current row number for this Charge type | The reference points to this row or a later row | Point to an earlier row. |