PintLint

Rules / IBR-SR-61

Allowance/charge tax exemption reason must occur maximum once

Allowance/charge tax exemption reason (ibt-197) (ibt-199) must occur maximum once.

Fails

<cac:TaxCategory>
  <cbc:TaxExemptionReason>…</cbc:TaxExemptionReason>
  <cbc:TaxExemptionReason>…</cbc:TaxExemptionReason>
</cac:TaxCategory>

Fix

Keep one cbc:TaxExemptionReason in cac:AllowanceCharge/cac:TaxCategory and delete the extras. If both values matter, one of them belongs in a different field.

Schematron
Context
cac:AllowanceCharge/cac:TaxCategory
Test
(count(cbc:TaxExemptionReason) <= 1)

Official text: Allowance/charge tax exemption reason (ibt-197) (ibt-199) MUST occur maximum once.

Official · PINT shared rules. Severity: error. Runs on UBL XML.

Check your invoice for this rule