VRBL-INV-FR-CIUS-1p0-B2G-4

Basic Info

Rule For B2G, if the Seller Legal Registration ID used as SIREN is present, the Seller Party ID used as SIRET must be present, and its beginning must match the SIREN.
Context /ubl:Invoice
Pattern vrbl-invoice-fr-cpro-b2g
Severity warning

Implementation

not($isB2G)
or
not(boolean(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID = '0002' or not(boolean(@schemeID))]))
or
boolean(cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID[
	@schemeID = '0009'
	and
	substring(normalize-space(.), 1, 9)
	=
	normalize-space(/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID[@schemeID = '0002' or not(boolean(@schemeID))])
])