aligned-ibr-004-aunz

An invoice must contain the Buyer's ABN (ibt-047) if Buyer country (ibt-055) is Australia

error: the document is invalid

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Context
cac:AccountingCustomerParty/cac:Party[$buyerCountry = 'AU']
Test
(string-length(cac:PartyLegalEntity/cbc:CompanyID)>=1 and cac:PartyLegalEntity/cbc:CompanyID/@schemeID = '0151')

Checked with PINT A-NZ Invoice, PINT A-NZ Credit Note