PintLint

Rules / IBR-038

Each Document level charge must have a Document level charge reason or a Document level charge reason code

Each Document level charge (ibg-21) must have a Document level charge reason (ibt-104) or a Document level charge reason code (ibt-105).

Fails when this is false

((exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode)) and not(exists(ancestor::cac:InvoiceLine|ancestor::cac:CreditNoteLine))) or (ancestor::cac:InvoiceLine | ancestor::cac:CreditNoteLine)

The schematron test, verbatim. Context: cac:AllowanceCharge[cbc:ChargeIndicator = true()]

Fix

Change the data so the condition below holds. It reads cac:CreditNoteLine, cac:InvoiceLine, cbc:AllowanceChargeReason, cbc:AllowanceChargeReasonCode. Paste the invoice into the validator to see the exact element that fails.

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

Check your invoice for this rule