# ibr-042

Source: https://xmlvalid.com/rules/ibr-042

> Each Invoice line allowance (ibg-27) MUST have an Invoice line allowance reason (ibt-139) or an Invoice line allowance reason code (ibt-140).

- Level: error
- Rule sets: PINT Billing rules 1.1.3, PINT Billing rules (as shipped with PINT AE) 1.0.4
- Context: `cac:AllowanceCharge[cbc:ChargeIndicator = false()]`
- Test: `exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) or not(exists(ancestor::cac:InvoiceLine|ancestor::cac:CreditNoteLine))`

Validate a document against these rules: https://xmlvalid.com/validate
