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.
A document-level allowance or charge may contain no more than one VAT rate. The test does not require a VAT rate to be present.
A document-level allowance or charge contains multiple VAT rates. No more than one rate is allowed for this entry; a rate is not required to be present.
- Check the number of
ram:RateApplicablePercentelements inram:SpecifiedTradeAllowanceCharge. - Keep no more than one such element; it may also be omitted.
- Check the entry through
AddTradeAllowance(...)orAddTradeCharge(...), then regenerate the invoice and check it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:RateApplicablePercent>19</ram:RateApplicablePercent> <ram:RateApplicablePercent>7</ram:RateApplicablePercent> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:RateApplicablePercent>19</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.GetTradeAllowances()(BG-20)
Technical details
The test counts the ram:RateApplicablePercent elements in the context and allows no more than one.
The rule applies to each document-level ram:SpecifiedTradeAllowanceCharge, whether it is an allowance or a charge.
rule/@context)assert/@test)