Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a VAT category code (BT-95).
A ram:SpecifiedTradeAllowanceCharge contains more than one ram:CategoryTradeTax element. The test limits the count to at most one; it does not require the element to be present.
The rule prevents more than one VAT category from being assigned to an allowance or charge.
An allowance or charge contains multiple VAT categories. Remove the extra entries; this test does not require a VAT category to be present.
- Check the affected allowance or charge.
- Use no more than one VAT category in
AddTradeAllowance(...)orAddTradeCharge(...). - Generate the invoice again and validate it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:CategoryTradeTax/> <ram:CategoryTradeTax/> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:CategoryTradeTax/> </ram:SpecifiedTradeAllowanceCharge>
TaxCategoryCodes(BT-95)AbstractTradeAllowanceCharge(Document level allowance: BG-20; Document level charge: BG-21)AbstractTradeAllowanceCharge.ChargeIndicator(Document level allowance: BG-20; Document level charge: BG-21)FacturXInvoice.AddTradeAllowance(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-20)FacturXInvoice.AddTradeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-21)
Technical details
The test counts ram:CategoryTradeTax elements within ram:SpecifiedTradeAllowanceCharge and allows at most one.
The rule applies to each document-level ram:SpecifiedTradeAllowanceCharge, meaning an allowance or charge.
rule/@context)assert/@test)