VRBL-INV-SA-1p2-11

Basic Info

Rule If the Tax Subtotal Category Exemption Reason Code is equal to VRBL:SA:VATEX-SA-EDU or VRBL:SA:VATEX-SA-HEA, then the Buyer Party Identification ID is mandatory and the Buyer Party Identification Scheme ID must be = VRBL:SA:NAT.
Context /ubl:Invoice
Pattern vrbl-invoice-sa-1p2
Severity fatal

Implementation

not(
	cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TaxExemptionReasonCode = 'VRBL:SA:VATEX-SA-EDU' 
	or 
	cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TaxExemptionReasonCode = 'VRBL:SA:VATEX-SA-HEA'
	) 
or 
boolean(cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID)
and
cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID/@schemeID = 'VRBL:SA:NAT'