VRBL-INV-AT-B2G-UBL-1p0-1

Basic Info

Rule The Seller Tax ID used for VAT ID and/or Seller ID not used for BBG and/or Seller Legal Registration ID must be present.
Context /ubl:Invoice/cac:AccountingSupplierParty/cac:Party
Pattern vrbl-invoice-at-b2g-ubl-1p0
Severity fatal

Implementation

not(boolean(cac:PartyIdentification/cbc:ID[@schemeID = concat($VRBL-AT-Prefix, 'BBG')]))
or
boolean(cac:PartyTaxScheme[cac:TaxScheme/cbc:ID='VAT']/cbc:CompanyID)
or
boolean(cac:PartyIdentification/cbc:ID[@schemeID != concat($VRBL-AT-Prefix, 'BBG')])
or
boolean(cac:PartyLegalEntity/cbc:CompanyID)