# aligned-ibrp-o-13-aunz

Source: https://xmlvalid.com/rules/aligned-ibrp-o-13-aunz

> An Invoice that contains a tax breakdown group (ibg-23) with a tax category code (ibt-118) "Not subject to tax" MUST not contain Document level allowances (ibg-20) where Document level allowance tax category code (ibt-095) is not "Not subject to tax".

- Level: error
- Rule sets: PINT A-NZ rules (Australia and New Zealand) 1.1.3
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `(exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='GST']/cbc:ID[normalize-space(.) = 'O']) and count(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) != 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='GST']) = 0) or not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='GST']/cbc:ID[normalize-space(.) = 'O'])`

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