Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator.
The ram:ChargeIndicator element is missing from ram:SpecifiedTradeAllowanceCharge. Without it, the entry is not identified as an allowance or a charge.
The indicator distinguishes an allowance from a charge. This distinction is needed to classify the document-level entry correctly.
A document-level allowance or charge is missing the indicator that identifies its type. Add this information so the entry is clear.
- Determine whether the entry is an allowance or a charge.
- Use the appropriate call to
AddTradeAllowance(...)orAddTradeCharge(...). - Check the value set through
AbstractTradeAllowanceCharge.ChargeIndicator. - Generate the invoice again and validate it once more.
<ram:SpecifiedTradeAllowanceCharge/>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> </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 XPath test requires a direct ram:ChargeIndicator child element under ram:SpecifiedTradeAllowanceCharge.
The rule applies to each ram:SpecifiedTradeAllowanceCharge entry at document level, whether it represents an allowance or a charge.
rule/@context)assert/@test)