VRBL-INV-IT-1p2-6

Basic Info

Rule For the Invoice Type Code "TD21" the Seller Tax ID used as VAT ID must equal the Buyer Tax Company ID used as VAT ID.
Context /ubl:Invoice
Pattern vrbl-invoice-it-1p2
Severity fatal

Implementation

not(
	cbc:InvoiceTypeCode = concat($VRBL-IT-Prefix, 'TD21')
)
or
not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID != cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID)