Set up sales and purchase taxes ​

Tax setup makes ERPNext calculate the right tax, post it to the right account, and keep the detail for tax reports. The tax on a document can depend on the Item, the party, the address, and the type of sale. Reusable templates and rules let ERPNext choose the tax, so that users do not build it on each invoice.

This page gives the setup order and shows how the parts work together. Confirm the rates and the legal treatment with a tax adviser.

PartWhat it does
Tax accountThe ledger account that receives the tax, with Account Type set to Tax
Sales or purchase taxes and charges templateA reusable set of tax rows for a document
Tax CategoryA tax treatment, such as domestic, export, or exempt
Tax RuleSelects a template from the party, address, and other conditions
Item Tax TemplateA different rate, or an exemption, for specific Items
Tax Withholding CategoryTax deducted at source on payments

Prerequisites ​

  • You know the tax registrations, rates, place-of-supply rules, recoverable taxes, and reporting needs.
  • The tax accounts exist in the chart of accounts.

1. Create the tax templates ​

  1. Open the Sales Taxes and Charges Template list (or the Purchase Taxes and Charges Template list) and select Add.
  2. Enter the Title and select the Company.
  3. Add one row for each tax or charge:
    • Type: how the tax is calculated, for example On Net Total, Actual, or On Previous Row Total.
    • Account Head: the tax account.
    • Tax Rate and Description.
  4. On a purchase template, set Consider Tax or Charge for on each row: Total, Valuation, or Valuation and Total. A recoverable tax counts in the total only. A tax that you cannot recover can be added to the stock valuation.
  5. Select Default only if the template applies to most documents.
  6. Save.

Learn more in Sales Taxes and Charges Template and Purchase Taxes and Charges Template.

2. Create tax categories ​

  1. Open the Tax Category list and add one category for each tax treatment, for example Domestic, Export, and Exempt.
  2. Select the Tax Category on the templates, and on the customers, suppliers, or addresses that it applies to.

In Accounts Settings, Determine Address Tax Category from selects whether ERPNext reads the category from the billing address or the shipping address.

3. Create tax rules ​

Create a Tax Rule when ERPNext must choose a template from conditions such as the company, customer, supplier, Item Group, billing or shipping location, tax category, and dates.

4. Set Item-specific rates ​

Create an Item Tax Template for Items with a different rate or an exemption, and select it on the Item or the Item Group.

5. Test each tax treatment ​

Create a draft Sales Invoice and Purchase Invoice for each treatment. Check the taxable value, each tax row, the grand total, and the printed tax details. Select Preview > Accounting Ledger to check the accounts. Include discounts, returns, and foreign-currency documents if they apply.

Regional tax features ​

Country apps can add tax IDs, reports, e-invoicing, and legal checks. For example, India GST features are in the India Compliance app. Follow the regional documentation when it differs from this setup.

Troubleshooting ​

ERPNext selects the wrong tax template ​

Check the tax category of the party and the address, the priority and dates of the tax rules, the company, and the document date.

The tax is missing for one Item ​

Check the Item Tax Template of the Item and its Item Group, and the tax accounts in the document's tax template.

The tax is calculated on the wrong amount ​

Check the Type of the row. On Previous Row Amount and On Previous Row Total also need a Reference Row #.