Reason for an invoice line allowance

Error BR-CO-23 EN 16931

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.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

An allowance has neither ram:Reason nor ram:ReasonCode. The rule requires at least one of these elements.

What the rule means

An invoice line allowance must be identifiable by a reason, a reason code, or both.

Affected fields BG-27 BT-139 BT-140
Please provide a reason for the invoice line allowance

A reason or reason code is missing for an invoice line allowance. You can resolve this by adding at least one of these details.

What to do
  1. Add a reason for the allowance using AbstractTradeAllowanceCharge.Reason, or add a reason code using TradeAllowance.ReasonCode.
  2. Check that the detail belongs to the invoice line allowance.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:Reason>Motif</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
Check in FactoorSharp
  • 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.

Where the rule applies

The rule applies to allowances in ram:SpecifiedTradeAllowanceCharge within an invoice line’s ram:SpecifiedLineTradeSettlement.

Context (rule/@context)
//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'false']
Test expression (assert/@test)
(../ram:Reason) or (../ram:ReasonCode)