Each Document level charge or tax (BG-21) shall contain a Document level charge or tax reason (BT-104) or a Document level charge reason code (BT-105) or Document level non-VAT tax code (BT-177), or both reason and code.
The SpecifiedTradeAllowanceCharge with ChargeIndicator set to true has neither a Reason nor a ReasonCode. As a result, no reason or reason code is provided for the charge.
A document-level charge requires a reason, a reason code, or both. This information describes the charge in business terms.
A document-level charge is missing both a reason and a reason code. Either detail can be used to describe the charge.
- Add a reason or a reason code to the relevant charge.
- Check the values for
ChargeReasonCodes,TradeCharge.ReasonCode, orAbstractTradeAllowanceCharge.Reason. - Check the
AddTradeCharge(...)call for the charge. - Generate the invoice again and validate it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator>true</ram:ChargeIndicator> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator>true</ram:ChargeIndicator> <ram:Reason>Delivery fee</ram:Reason> </ram:SpecifiedTradeAllowanceCharge>
ChargeReasonCodes(Document level charge: BT-105)TradeCharge.ReasonCode(Document level charge: BT-105)AbstractTradeAllowanceCharge.Reason(Document level charge: BT-104)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
For a SpecifiedTradeAllowanceCharge with ChargeIndicator set to true, the test checks whether at least one of the sibling elements Reason or ReasonCode exists.
The rule applies to a document-level charge in ApplicableHeaderTradeSettlement that is identified as a charge by ChargeIndicator.
rule/@context)assert/@test)