Provide a reason for a document-level charge

Error BR-FXEXT-BR-38 Factur-X

Each Document level charge or tax (BG-21) shall contain a Document level charge or tax reason (BT-104) or a Document level charge reason code (BT-105) or Document level non-VAT tax code (BT-177), or both reason and code.

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

The charge contains neither ram:Reason nor ram:ReasonCode. At least one of these elements must be present.

What the rule means

A reason or reason code explains why the document-level charge is applied.

Affected fields BG-21 BT-104 BT-105 BT-177
Please provide a reason or reason code for the charge

A reason is missing for a document-level charge. Add a written reason or a reason code to make the charge understandable.

What to do
  1. For the charge, provide either a reason in Reason or a code in ReasonCode.
  2. Check the entry supplied through AddTradeCharge(...) or the values in TradeCharge.ReasonCode and AbstractTradeAllowanceCharge.Reason.
  3. Regenerate the invoice and validate it again.
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>Frais de traitement</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
Check in FactoorSharp
  • ChargeReasonCodes (Document level charge: BT-105)
  • TradeCharge.ReasonCode (Document level charge: BT-105)
  • AbstractTradeAllowanceCharge.Reason (Document level charge: BT-104)
  • FacturXInvoice.AddTradeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode) (BG-21)
  • FacturXInvoice.GetTradeCharges() (BG-21)
Technical details

For each charge with ram:ChargeIndicator equal to true, the test checks whether the directly associated ram:Reason or ram:ReasonCode exists.

Where the rule applies

This rule applies to a document-level charge in ram:SpecifiedTradeAllowanceCharge where ram:ChargeIndicator is true.

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