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

Basic Info

Rule When the Invoice Subtype Code represents a subcontractor or co-contractor type (S3, S5 or S6), the Seller Agent Party Identification ID used as SIRET must not be identical to that of the government entity known to Chorus Pro (11000201100044).
Context /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:AgentParty/cac:PartyIdentification/cbc:ID
Pattern vrbl-invoice-fr-cpro-b2g
Severity warning

Implementation

not($isB2G)
or
not(
	contains(
		$VRBL-CL-FR-InvoiceSubtypeCode-SubcontractorCocontractor,
		concat(
			substring($VRBL-CL-FR-InvoiceSubtypeCode-SubcontractorCocontractor, 1, 1),
			substring-after(normalize-space(/ubl:Invoice/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:InvoiceSubtypeCode), $VRBL-FR-Prefix),
			substring($VRBL-CL-FR-InvoiceSubtypeCode-SubcontractorCocontractor, 1, 1)
		)
	)
)
or
@schemeID!='0009'
or
normalize-space(.) != '11000201100044'