Tax Rules
Tax rules allow configuring tax rates with different levels of specificity.
Rule Fields
| Field | Description |
|---|---|
| Name | Descriptive rule name |
| Scope | Application level (see table) |
| Priority | Higher number = higher priority within the scope |
| Active | Whether the rule is active |
| Validity | Validity period (from/to) |
| Items | List of taxes and rates |
Matching Criteria (optional)
| Field | Description |
|---|---|
| Company | Specific issuing company |
| Service item | Specific service |
| Billing account | Specific customer |
| Customer tax type | Customer classification |
| Municipality | IBGE municipality code |
| Operation type | internal or external |
Scope and Priority
Rules are evaluated from most specific to most generic:
| Scope | Priority | Description |
|---|---|---|
customer | 100 | Rule for a specific customer |
service | 80 | Rule for a specific service item |
company | 60 | Rule for the issuing company |
municipality | 40 | Rule by municipality |
organization | 20 | Organization-wide rule |
global | 0 | System default |
The rule with the highest priority takes precedence. Multiple rules with the same priority are combined.
Rule Items
Each rule contains items that define rates:
| Field | Description |
|---|---|
| Tax type | ISS, PIS, COFINS, CSLL, IRPJ, IRRF, CSRF, INSS |
| Rate | Percentage (e.g., 5.00 for 5%) |
| Withheld | Whether it is withheld at source |
| Calculation base | service_value, service_value_minus_iss, or presumed_base |
| Exempt | Whether the tax is exempt |
| Exemption reason | Justification for the exemption |
Examples
Organization default ISS
Scope: organization (priority 20)
Item: ISS = 5.00%, withheld at source, base = service value
Service-specific rule
Scope: service (priority 80)
Service item: "Software Development"
Items:
- ISS = 3.50%, not withheld
- IRRF = 15.00%, withheld at source
The service rule takes precedence over the organization rule for ISS.