Apply a tax on another tax ​

Some taxes are calculated on another tax, for example a surcharge on a tax amount or a levy on the subtotal after tax. In a taxes template, you set this up with one of two row types:

TypeBaseUse when the rule says
On Previous Row AmountThe Amount of the referenced rowThe second tax applies to the earlier tax amount only
On Previous Row TotalThe running Total after the referenced rowThe second tax applies to the subtotal that includes the earlier tax

With a Net Total of 1,000, row 1 at 8% On Net Total, and row 2 at 2% with Reference Row # 1:

Row 2 typeRow 2 baseRow 2 amountGrand Total
On Previous Row Amount80.001.601,081.60
On Previous Row Total1,080.0021.601,101.60

Prerequisites ​

Set up the rows ​

  1. Add the base tax as an earlier row, for example Type On Net Total, the tax account, and Tax Rate 8.
  2. Below it, add the dependent row:
    1. Set Type to On Previous Row Amount or On Previous Row Total.
    2. In Reference Row #, enter the number of the base row, for example 1.
    3. Select the Account Head of the second tax.
    4. Enter the Tax Rate, for example 2.
  3. Save.

Tax row with On Previous Row Amount, Reference Row #, and Tax Rate

Reference Row # stores a row number. When you insert, delete, or move rows, check every reference again.

Check the calculation ​

  1. Create a draft document, for example a Sales Invoice, with one item worth 1,000, and select the template.
  2. In the tax table, check row 2:
    • Net Amount shows the base: 80 for On Previous Row Amount, 1,080 for On Previous Row Total.
    • Amount shows 1.60 or 21.60.
  3. Check Total Taxes and Charges and Grand Total.
  4. Submit a test document and check each tax account in the General Ledger.

Tax table with a 2 percent tax calculated on the running total of 1,080

Longer sequences ​

A row can reference any earlier row. For example: row 1 is a tax on Net Total, row 2 a fixed charge, and row 3 a percentage On Previous Row Total. If row 3 references row 2, its base includes the items, row 1, and row 2. If it references row 1, the base excludes row 2.

Each row has one reference. On Previous Row Amount uses the amount of one row only. To tax several rows together, reference the row whose running Total contains them.

Write the base in the row Description, for example "2% on total after base tax", so that others can check the template.

Item-specific rates, purchases, and returns ​

  • When items use Item Tax Templates, the base row's Amount is the sum after the item rates. The dependent row uses that amount.
  • On purchase rows, also choose Consider Tax or Charge for for each row. See Include tax in valuation or total.
  • A Credit Note copies the rows and reverses both taxes. Test one before you rely on the template.

Troubleshooting ​

ProblemCause and fix
The second tax is much larger than expectedThe row uses On Previous Row Total. Use On Previous Row Amount if the base is the earlier tax only.
The second tax is too smallThe row uses On Previous Row Amount. Use On Previous Row Total if the base is the running total.
The base includes an unwanted chargeReference Row # points to a later row than intended.
The result changed after editing the templateRow numbers changed. Check Reference Row # on every dependent row.
"Cannot refer row number greater than or equal to current row number for this Charge type"Point the reference to an earlier row.