Include an indicator for each allowance or charge

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. As a result, the type of amount in this XML section is not provided through the indicator checked by this rule.

What the rule means

The indicator distinguishes an allowance from a charge in this group.

Affected fields BG-20 BG-21
Please identify each allowance or charge with an indicator.

An allowance or charge is missing the indicator that identifies its type. Add the information so that the group is clearly identified.

What to do
  1. Check the affected allowance or charge.
  2. Use AddTradeAllowance(...) for an allowance or AddTradeCharge(...) for a charge.
  3. Generate the invoice again and validate it again.
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.AddTradeeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode) (BG-21)
Technical details

The test checks whether ram:ChargeIndicator is present as an element within ram:SpecifiedTradeAllowanceCharge.

Where the rule applies

The rule applies to each document-level ram:SpecifiedTradeAllowanceCharge.

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