Each Document level allowance (BG-20) shall have a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98).
The allowance has neither Reason nor ReasonCode. At least one of these two elements must be provided.
A document-level allowance must be explained by a reason text or a reason code. The rule permits either field on its own or both together.
The allowance has neither a reason text nor a reason code. Provide at least one of these details.
- Provide a reason for the allowance through
Reasonor a reason code throughReasonCode. - Review the corresponding details in
AddTradeAllowance(...). - Generate the invoice again and validate it.
<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>Remise commerciale</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
For allowances with ChargeIndicator set to false, the test requires at least one of the elements Reason or ReasonCode.
The rule applies to an allowance in SpecifiedTradeAllowanceCharge at document level when ChargeIndicator has the value false.
rule/@context)assert/@test)