PEPPOL-EN16931-R043

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

error: the document is invalid Peppol documentation ↗

Why it fails

  • cbc:ChargeIndicator holds something other than true or false: 1, 0, True or FALSE.

How to fix it

Write true for a charge and false for an allowance, in lower case. XML Schema accepts 1 and 0 as booleans, Peppol does not.

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Context
ubl-invoice:Invoice/cac:AllowanceCharge | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge
Test
normalize-space(cbc:ChargeIndicator/text()) = 'true' or normalize-space(cbc:ChargeIndicator/text()) = 'false'

Checked with Peppol BIS Billing 3.0 Invoice, Peppol BIS Billing 3.0 Credit Note