BR-FR-CO-07_BT-9
The rule sets below word this rule differently; each wording is shown with its rule set.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
[BR-FR-CO-07/BT-9] La date d’échéance (BT-9), si présente, doit être postérieure ou égale à la date de facture (BT-2), sauf si la facture est de type acompte (386, 500, 503) ou si le cadre de facturation (BT-23) est B2, S2 ou M2. Valeurs actuelles : Date facture = " … ", Date échéance = " … ", Type = " … ", Cadre = " … ".
ubl:Invoice | cn:CreditNote
not($dueDate and not($typeCode = '386' or $typeCode = '500' or $typeCode = '503' or $billingContext = 'B2' or $billingContext = 'S2' or $billingContext = 'M2') and $dueDate < $issueDate)
Checked with France e-invoice (UBL), France e-credit note (UBL), France EXTENDED-CTC-FR (UBL)
BR-FR-CO-07/BT-9 : La date d’échéance (BT-9), si présente, doit être postérieure ou égale à la date de facture (BT-2), sauf si la facture est de type acompte (386, 500, 503) ou si le cadre de facturation (BT-23) est B2, S2 ou M2. Valeurs actuelles : Date facture = " … ", Date échéance = " … ", Type = " … ", Cadre = " … ".
rsm:CrossIndustryInvoice
not($dueDate[normalize-space(.)]) or ($typeCode = ('386', '500', '503') or $frameworkCode = ('B2', 'S2', 'M2') or (every $dt in $dueDate satisfies $dt ge $issueDate))
Checked with France e-invoice (CII), France Factur-X EN 16931, France EXTENDED-CTC-FR (CII), France Factur-X EXTENDED, France Factur-X BASIC WL