Reason for the document level charge

Error BR-CO-22 EN 16931

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

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

The charge is missing both ram:Reason and ram:ReasonCode. At least one of these elements must be present.

What the rule means

The reason explains why the document level charge is applied. It can be provided as text, as a code, or in both forms.

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

A document level charge is missing its reason. You can provide the reason as text, as a code, or in both forms.

What to do
  1. Add a reason for the charge in ram:Reason or a reason code in ram:ReasonCode.
  2. Check the AddTradeCharge(...) call and the values for Reason and ReasonCode.
  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>Example reason</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

The check applies to ram:ChargeIndicator with the value true. It passes when ram:Reason or ram:ReasonCode is present.

Where the rule applies

The rule applies to each charge in ram:SpecifiedTradeAllowanceCharge within ram:ApplicableHeaderTradeSettlement that is identified as a charge by ram:ChargeIndicator.

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