Rules / IBR-033
Each Document level allowance must have a Document level allowance reason or a Document level allowance reason code
Each Document level allowance (ibg-20) must have a Document level allowance reason (ibt-097) or a Document level allowance reason code (ibt-098).
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 = false()]
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.