Provide an allowance or charge indicator

Error CII-SR-463 Syntax (UBL/CII)

Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator.

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

The ram:ChargeIndicator element is missing from ram:SpecifiedTradeAllowanceCharge. Without it, the entry is not identified as an allowance or a charge.

What the rule means

The indicator distinguishes an allowance from a charge. This distinction is needed to classify the document-level entry correctly.

Affected fields BG-20 BG-21
Please identify the allowance or charge

A document-level allowance or charge is missing the indicator that identifies its type. Add this information so the entry is clear.

What to do
  1. Determine whether the entry is an allowance or a charge.
  2. Use the appropriate call to AddTradeAllowance(...) or AddTradeCharge(...).
  3. Check the value set through AbstractTradeAllowanceCharge.ChargeIndicator.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge/>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
Check in FactoorSharp
  • AbstractTradeAllowanceCharge (Document level allowance: BG-20; Document level charge: BG-21)
  • AbstractTradeAllowanceCharge.ChargeIndicator (Document level allowance: BG-20; Document level charge: BG-21)
  • FacturXInvoice.AddTradeAllowance(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode) (BG-20)
  • FacturXInvoice.AddTradeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode) (BG-21)
  • FacturXInvoice.GetTradeAllowances() (BG-20)
Technical details

The XPath test requires a direct ram:ChargeIndicator child element under ram:SpecifiedTradeAllowanceCharge.

Where the rule applies

The rule applies to each ram:SpecifiedTradeAllowanceCharge entry at document level, whether it represents an allowance or a charge.

Context (rule/@context)
//ram:SpecifiedTradeAllowanceCharge
Test expression (assert/@test)
(ram:ChargeIndicator)