Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both.
The allowance is missing both ram:Reason and ram:ReasonCode. At least one of these elements must be present.
The reason explains why the document level allowance is granted. It can be provided as text, as a code, or in both forms.
A document level allowance is missing its reason. You can provide the reason as text, as a code, or in both forms.
- Add a reason for the allowance in
ram:Reasonor a reason code inram:ReasonCode. - Check the
AddTradeAllowance(...)call and the values forReasonandReasonCode. - Regenerate the invoice and validate it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:Reason>Example reason</ram:Reason> </ram:SpecifiedTradeAllowanceCharge>
AllowanceReasonCodes(Document level allowance: BT-98)TradeAllowance.ReasonCode(Document level allowance: BT-98)AbstractTradeAllowanceCharge.Reason(Document level allowance: BT-97)FacturXInvoice.AddTradeAllowance(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-20)FacturXInvoice.GetTradeAllowances()(BG-20)
Technical details
The check runs for ram:ChargeIndicator with the value false. It passes when ram:Reason or ram:ReasonCode is present.
The rule applies to each allowance in ram:SpecifiedTradeAllowanceCharge within ram:ApplicableHeaderTradeSettlement that is identified as an allowance by ram:ChargeIndicator.
rule/@context)assert/@test)