Allowance or charge indicator value

Error PEPPOL-EN16931-R043-2 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 applied entry is an allowance or a charge.

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

The applied 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:AppliedTradeAllowanceCharge.
  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:AppliedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>yes</udt:Indicator>
  </ram:ChargeIndicator>
</ram:AppliedTradeAllowanceCharge>
✓ Correct
<ram:AppliedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
</ram:AppliedTradeAllowanceCharge>
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:AppliedTradeAllowanceCharge.

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