Tax Rule in ERPNext
A Tax Rule in ERPNext is used to automatically apply taxes to sales or purchase transactions based on predefined conditions.
It determines which Tax Template should be applied depending on factors such as customer, supplier, item, item group, or tax category.
Tax Rules enable fully automated tax application, reducing manual selection and ensuring consistency across transactions.
Access Path
You can access Tax Rules in ERPNext at:
Home > Accounting > Taxes > Tax Rule
1. Prerequisites
Before creating a Tax Rule, it is recommended to configure:
- Sales Taxes and Charges Template
- Purchase Taxes and Charges Template
These templates define the actual tax structure that will be applied.
2. Creating a Tax Rule
Follow these steps to create a Tax Rule:
- Go to the Tax Rule list and click New.
- Select Tax Type (Sales or Purchase).
- Choose the appropriate Tax Template.
- Save the record.
3. Key Features of Tax Rule
3.1 Customer or Supplier-Based Rules
Tax Rules can be applied based on:
- Specific Customer or Supplier
- Customer Group or Supplier Group
- All parties (default rule)
Billing and shipping addresses are automatically considered when determining tax applicability.
3.2 Item or Item Group-Based Rules
Tax Rules can also be applied based on:
- Specific Items
- Item Groups
This ensures that certain products automatically follow defined tax structures.
3.3 Tax Category Integration
Tax Rules work closely with Tax Categories to apply multiple rule-based conditions in a single transaction.
This enables advanced tax automation scenarios.
3.4 Validity Period
Tax Rules can be time-bound using:
- Start Date
- End Date
If left blank, the rule applies indefinitely.
3.5 Priority Handling
When multiple Tax Rules match, ERPNext uses priority to decide which rule applies:
- Priority 1 = Highest
- Priority 2 = Lower priority
- And so on
4. How Tax Rule Works
Tax Rules are triggered automatically during transaction creation.
Example Scenario
If a customer’s billing address is in “Malibu”, the system can automatically apply:
- State Tax: 6.25%
- County Tax: 1%
- District Tax: 2.25%
Workflow
- Create a Sales Taxes and Charges Template
- Define Tax Rule conditions
- Assign rule based on address or customer
- Create a Sales Invoice
- ERPNext auto-applies matching tax structure
5. Important Notes
It is recommended not to reuse the same Tax Template in both Tax Rules and Item Tax Templates, as it may cause conflicts in tax application logic.
6. Related Topics
- Pricing Rule
- Tax Category
- Item Tax Template
- Customer
- Supplier
- Sales Taxes and Charges Template
SUMMARY
Tax Rules in ERPNext automate the application of taxes based on defined business conditions such as customer, supplier, item, or location. They ensure accurate, consistent, and rule-based tax calculations across all transactions.