VRBL-INV-EN16931-M-65

Basic Info

Rule An Invoice that contains a Allowance Group where the Allowance Tax ID is "Export outside the EU" must contain the Seller Tax ID and/or the Tax Representative Tax Company ID.
Context /ubl:Invoice
Pattern vrbl-invoice-en16931-ubl-model
Severity fatal

Implementation

(boolean(cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']/cac:TaxCategory[cbc:ID = 'G']) 
and 
(boolean(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID) 
or 
boolean(cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID))) 
or 
not(boolean(cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']/cac:TaxCategory[cbc:ID = 'G'][cac:TaxScheme/cbc:ID = 'VAT']))