Reason for the 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

Both Reason and ReasonCode are missing from the allowance. As a result, the invoice line contains neither a textual explanation nor a reason code for the allowance.

What the rule means

An invoice line allowance must be traceable through a reason, a reason code, or both. This information explains why the allowance is granted.

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

The reason for an invoice line allowance is missing. You can provide it as text, as a reason code, or with both entries.

What to do
  1. Add AbstractTradeAllowanceCharge.Reason or TradeAllowance.ReasonCode for the allowance.
  2. Check that the entry is in the appropriate SpecifiedTradeAllowanceCharge for the invoice line.
  3. Generate the invoice again and validate it once more.
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>Remise commerciale</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 runs for ChargeIndicator with the value false and passes if Reason or ReasonCode is present in the parent SpecifiedTradeAllowanceCharge.

Where the rule applies

The rule applies to an allowance in SpecifiedTradeAllowanceCharge within an invoice line's settlement data. The ChargeIndicator element identifies the entry as an allowance.

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