VRBL-INV-EN16931-M-68

Basic Info

Rule An Invoice that contains an Invoice Line Group where the Invoice Line Tax ID is "Intra-community supply" must contain the Seller Tax ID and/or the Tax Representative Tax Company ID and/or Buyer Tax Company ID.
Context /ubl:Invoice
Pattern vrbl-invoice-en16931-ubl-model
Severity fatal

Implementation

(boolean(cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[cbc:ID = 'K'][cac:TaxScheme/cbc:ID = 'VAT']) 
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))
and 
(boolean(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID))) 
or 
not(cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[cbc:ID = 'K'][cac:TaxScheme/cbc:ID = 'VAT'])