Provide a reason or reason code for the allowance

Error BR-33 EN 16931

Each Document level allowance (BG-20) shall have a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98).

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

The allowance has neither Reason nor ReasonCode. At least one of these two elements must be provided.

What the rule means

A document-level allowance must be explained by a reason text or a reason code. The rule permits either field on its own or both together.

Affected fields BG-20 BT-97 BT-98
Please provide a reason for the document-level allowance

The allowance has neither a reason text nor a reason code. Provide at least one of these details.

What to do
  1. Provide a reason for the allowance through Reason or a reason code through ReasonCode.
  2. Review the corresponding details in AddTradeAllowance(...).
  3. Generate the invoice again and validate it.
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 (Document level allowance: BT-98)
  • TradeAllowance.ReasonCode (Document level allowance: BT-98)
  • AbstractTradeAllowanceCharge.Reason (Document level allowance: BT-97)
  • FacturXInvoice.AddTradeAllowance(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode) (BG-20)
  • FacturXInvoice.GetTradeAllowances() (BG-20)
Technical details

For allowances with ChargeIndicator set to false, the test requires at least one of the elements Reason or ReasonCode.

Where the rule applies

The rule applies to an allowance in SpecifiedTradeAllowanceCharge at document level when ChargeIndicator has the value false.

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