Rules
VRBL-INV-FR-CIUS-1p0-B2G-50
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 the Buyer Party ID used as SIRET. |
| 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
not(boolean(/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID[@schemeID = '0009']))
or
not(boolean(/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID[@schemeID = '0009' and normalize-space(.) = normalize-space(current())]))