Each Invoice line allowance (BG-27) shall contain an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140), or both.
An allowance has neither ram:Reason nor ram:ReasonCode. The rule requires at least one of these elements.
An invoice line allowance must be identifiable by a reason, a reason code, or both.
A reason or reason code is missing for an invoice line allowance. You can resolve this by adding at least one of these details.
- Add a reason for the allowance using
AbstractTradeAllowanceCharge.Reason, or add a reason code usingTradeAllowance.ReasonCode. - Check that the detail belongs to the invoice line allowance.
- 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>Motif</ram:Reason> </ram:SpecifiedTradeAllowanceCharge>
AllowanceReasonCodes(Line level allowance: BT-140)TradeAllowance.ReasonCode(Line level allowance: BT-140)AbstractTradeAllowanceCharge.Reason(Line level allowance: BT-139)TradeLineItem.SpecifiedTradeAllowanceCharges(BG-27)AbstractTradeAllowanceCharge(Line level allowance: BG-27)
Technical details
The check applies to allowances marked by udt:Indicator with the value false. It passes if ram:Reason or ram:ReasonCode is present in the parent element.
The rule applies to allowances in ram:SpecifiedTradeAllowanceCharge within an invoice line’s ram:SpecifiedLineTradeSettlement.
rule/@context)assert/@test)