TaxRule
Updated
A tax determination rule picks a TaxCode from the deal context. Conditions live on TaxRuleCondition. Actions live on TaxRuleAction. When there are no action rows, the header Tax code is the action.
| Kind | Dictionary |
| Module | Tax |
| Menu | Tax → Dictionaries → Tax determination rules |
Fields#
| Field | Caption | Points at |
|---|---|---|
ID |
ID | number sequence |
Code |
Code | string, 64, required, unique |
Name |
Name | string, 128, required |
Priority |
Priority | integer, required |
Tax |
Tax | Tax |
Jurisdiction |
Jurisdiction | TaxJurisdiction |
TaxCode |
Tax code | TaxCode, required |
EffectiveFrom |
Effective from | date and time, required |
EffectiveTo |
Effective to | date and time |
IsDisabled |
Disabled | boolean |
Code, Name, Priority, TaxCode, and EffectiveFrom are required. ID comes from TaxRuleSeq, which starts at 1000 and steps by 1. Smaller Priority wins first. Equal priority then prefers the later Effective from, then the more specific rule (more conditions). Empty Tax applies to any tax. Empty Jurisdiction applies in any jurisdiction. Empty Disabled is live: the flag is named from the inverse so an empty boolean stays working. Empty Effective to leaves the row open.
Conditions#
TaxRuleCondition, caption Tax rule conditions. Menu Tax → Dictionaries → Tax rule conditions. All conditions of one group are AND; different groups are OR.
| Field | Caption | Points at |
|---|---|---|
ID |
ID | number sequence |
TaxRule |
Tax rule | this card, required |
Field |
Context field | string, 64, required |
Operator |
Operator | TaxRuleOperator, required |
Value |
Value | string, 256 |
ConditionGroup |
Condition group | integer |
ID comes from TaxRuleConditionSeq, which starts at 1000 and steps by 1. Context field is a path in the deal context (buyer.type, item.group, amount, ship.to.country). The engine does not own the path set; the caller does. Empty Condition group is group 0. Empty Value is unused for Exists / NotExists. For In, NotIn, and Between, values are comma-separated.
Operators: Eq, Neq, In, NotIn, Gt, Gte, Lt, Lte, Between, Exists, NotExists.
Actions#
TaxRuleAction, caption Tax rule actions. Menu Tax → Dictionaries → Tax rule actions. Several rows put several tax codes on one deal. An empty set takes Tax code from the rule header.
| Field | Caption | Points at |
|---|---|---|
ID |
ID | number sequence |
TaxRule |
Tax rule | this card, required |
TaxCode |
Tax code | TaxCode, required |
DisplayOrder |
Order | integer |
RateOverride |
Rate override | decimal, precision 9, scale 6 |
ID comes from TaxRuleActionSeq, which starts at 1000 and steps by 1. Smaller Order is earlier. Empty or zero Rate override uses the dated rate of the code. A filled override replaces that rate. Save refuses a negative override.
Hierarchy#
This dictionary is not hierarchical.
Who references this#
- TaxRuleCondition field
TaxRule - TaxRuleAction field
TaxRule - TaxCalculation field
MatchedRule
There are no commands. This dictionary writes no register. Determination also falls through to TaxMapping and TaxSettings when no rule matches.
A command that tests a rule against a sample deal is not in the product. Context field paths are not a closed catalog on this card.