Each Specified Trade Allowance Charge (BG-20)(BG-21) should contain a VAT rate (BT-96).
A ram:SpecifiedTradeAllowanceCharge contains more than one ram:RateApplicablePercent 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 rate from being assigned to an allowance or charge.
An allowance or charge contains multiple VAT rates. Remove the extra entries; this test does not require a VAT rate to be present.
- Check the affected allowance or charge.
- Use no more than one VAT rate in
AddTradeAllowance(...)orAddTradeCharge(...). - Generate the invoice again and validate it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:RateApplicablePercent>20</ram:RateApplicablePercent> <ram:RateApplicablePercent>10</ram:RateApplicablePercent> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:RateApplicablePercent>20</ram:RateApplicablePercent> </ram:SpecifiedTradeAllowanceCharge>
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)FacturXInvoice.AddTradeeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-21)
Technical details
The test counts ram:RateApplicablePercent 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)