Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both.
The charge is missing both ram:Reason and ram:ReasonCode. At least one of these elements must be present.
The reason explains why the document level charge is applied. It can be provided as text, as a code, or in both forms.
A document level charge is missing its reason. You can provide the reason as text, as a code, or in both forms.
- Add a reason for the charge in
ram:Reasonor a reason code inram:ReasonCode. - Check the
AddTradeCharge(...)call and the values forReasonandReasonCode. - Regenerate the invoice and validate it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</udt:Indicator> </ram:ChargeIndicator> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</udt:Indicator> </ram:ChargeIndicator> <ram:Reason>Example reason</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.GetTradeCharges()(BG-21)
Technical details
The check applies to ram:ChargeIndicator with the value true. It passes when ram:Reason or ram:ReasonCode is present.
The rule applies to each charge in ram:SpecifiedTradeAllowanceCharge within ram:ApplicableHeaderTradeSettlement that is identified as a charge by ram:ChargeIndicator.
rule/@context)assert/@test)