Rules / IBR-042
Each Invoice line allowance must have an Invoice line allowance reason or an Invoice line allowance reason code
Each Invoice line allowance (ibg-27) must have an Invoice line allowance reason (ibt-139) or an Invoice line allowance reason code (ibt-140).
Fails when this is false
exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) or not(exists(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.