Reason for the invoice line charge

Error BR-CO-24 EN 16931

Each Invoice line charge (BG-28) shall contain an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145), 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 charge. As a result, the invoice line contains neither a textual explanation nor a reason code for the charge.

What the rule means

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

Affected fields BG-28 BT-144 BT-145
Please provide a reason for the invoice line charge

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

What to do
  1. Add AbstractTradeAllowanceCharge.Reason or TradeCharge.ReasonCode for the charge.
  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>true</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:Reason>Livraison express</ram:Reason>
  <ram:ReasonCode>ABC</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
Check in FactoorSharp
  • ChargeReasonCodes (Line level charge: BT-145)
  • TradeCharge.ReasonCode (Line level charge: BT-145)
  • AbstractTradeAllowanceCharge.Reason (Line level charge: BT-144)
  • TradeLineItem.SpecifiedTradeAllowanceCharges (BG-28)
  • AbstractTradeAllowanceCharge (Line level charge: BG-28)
Technical details

The check runs for ChargeIndicator with the value true and passes if Reason or ReasonCode is present in the parent SpecifiedTradeAllowanceCharge.

Where the rule applies

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

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