Allowance or charge indicator value

Error PEPPOL-EN16931-R043-1 Peppol Business rule PEPPOL-EN16931-R043

Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'

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

The normalized text value of ram:ChargeIndicator/udt:Indicator is neither true nor false.

What the rule means

The indicator specifies whether the entry is an allowance or a charge.

Please set the allowance or charge indicator to `true` or `false`

The allowance or charge indicator does not contain either of the accepted values. You can resolve this by adjusting the indicator value.

What to do
  1. Find the affected ram:SpecifiedTradeAllowanceCharge.
  2. Set ram:ChargeIndicator/udt:Indicator to true or false.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>yes</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
Good to know

After leading and trailing spaces are removed, only true and false are accepted.

Technical details

After normalize-space, the text of ram:ChargeIndicator/udt:Indicator must be exactly true or false.

Where the rule applies

The rule applies to a ram:SpecifiedTradeAllowanceCharge.

Context (rule/@context)
ram:SpecifiedTradeAllowanceCharge
Test expression (assert/@test)
normalize-space(ram:ChargeIndicator/udt:Indicator/text()) = 'true' or normalize-space(ram:ChargeIndicator/udt:Indicator/text()) = 'false'