BR-FR-MV-08_BT-128
The rule sets below word this rule differently; each wording is shown with its rule set.
In English When the billing mode (BT-23) is S8, B8, M8, S9, B9 or M9, every line (BG-25) must have a VAT exemption reason text that starts with the line's sub-invoice number between # signs.
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-MV-08/BT-128] IDligne … , Raison exemption : … - Num fact ligne: … . Lorsque le cadre de facturation (BT-23) est S8, B8, M8 ou S9, B9, M9, chaque ligne (BG-25) doit contenir une raison d'exemption TVA en texte commençant par le numéro de sous-facture en ligne entre #.
(ubl:Invoice/cac:InvoiceLine|cn:CreditNote/cac:CreditNoteLine)[cac:BillingReference[cac:InvoiceDocumentReference/cbc:ID = $invoiceID]/cac:InvoiceDocumentReference/cbc:DocumentStatusCode = 'DETAIL']
not(custom:isSpecialContract(/ubl:Invoice|/cn:CreditNote)) or (normalize-space(cac:Item/cac:ClassifiedTaxCategory/cbc:TaxExemptionReason) != '' and $numfact != '' and starts-with(cac:Item/cac:ClassifiedTaxCategory/cbc:TaxExemptionReason, concat('#', $numfact, '#')))
Checked with France e-invoice (UBL), France e-credit note (UBL), France EXTENDED-CTC-FR (UBL)
BR-FR-MV-08/BT-128 : IDligne … , Raison exemption : … / Num fact ligne: … . Lorsque le cadre de facturation (BT-23) est S8, B8 ou M8, chaque ligne (BG-25) doit contenir une raison d'exemption TVA en texte commençant par le numéro de sous-facture en ligne entre #.
rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem[ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']
not(custom:isSpecialContract(/rsm:CrossIndustryInvoice)) or (normalize-space(./ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReason) != '' and $numfact != '' and starts-with(./ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReason, concat('#', $numfact, '#')))
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