Reason or reason code for an invoice line charge

Error BR-FXEXT-BR-44 Factur-X

Each Invoice line charge or tax (BG-28) shall have an Invoice line charge or tax reason (BT-144), an Invoice line charge reason code (BT-145) or an Invoice line-level non-VAT tax type code (BT-193).

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

A charge has neither ram:Reason nor ram:ReasonCode. The test expression requires at least one of these elements.

What the rule means

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

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

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

What to do
  1. Add a reason for the charge using AbstractTradeAllowanceCharge.Reason, or add a reason code using TradeCharge.ReasonCode.
  2. Check that the detail belongs to the invoice line charge.
  3. Generate the invoice again and validate it.
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:Reason>Motif</ram:Reason>
  </ram:ChargeIndicator>
</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 rule applies to charges marked by udt:Indicator with the value true. The supplied XPath test checks whether ram:Reason or ram:ReasonCode is present.

Where the rule applies

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

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