• Factur-X CII export missing SellerTradeParty for French micro-entreprise without VAT number

    Hello WPO team,

    I am testing the Factur-X 1.0 / EN 16931 XML generation in WPO PDF Invoices and have identified a possible issue with French businesses that are not VAT registered (micro-entreprise under franchise en base de TVA).

    My company is a French EI/micro-entreprise and therefore:

    • I have a valid SIRET number: 82207243500024
    • I do not have a VAT number because I am under the French VAT exemption regime (franchise en base, article 293 B du CGI)
    • My invoices correctly show VAT exemption information:
      • VAT category: E
      • Exemption code: VATEX-FR-FRANCHISE
      • Exemption reason: France domestic VAT franchise in base

    However, the generated Factur-X XML does not contain the required:

    <ram:SellerTradeParty>
    

    section.

    After reviewing the code, it appears that the cause is in:

    Cii/Handlers/SupplyChainTradeTransaction/ApplicableHeaderTradeAgreementHandler.php

    Specifically:

    if ( empty( $vat_number ) ) {
        wpo_ips_edi_log( 'CII ApplicableHeaderTradeAgreementHandler: VAT number is empty. Please check your shop settings.', 'error' );
        return null;
    }
    

    This condition prevents the SellerTradeParty from being generated when the VAT number is empty.

    For French businesses under franchise en base de TVA, having no VAT number is normal and does not mean the seller identity is missing. The seller should still be identified using:

    • company name
    • postal address
    • SIRET / registration identifier (coc_number in the current code)

    The generated XML should therefore include SellerTradeParty without a VAT registration element, for example:

    <ram:SellerTradeParty>
        <ram:Name>Mich Forster EI</ram:Name>
        <ram:SpecifiedLegalOrganization>
            <ram:ID>82207243500024</ram:ID>
        </ram:SpecifiedLegalOrganization>
        ...
    </ram:SellerTradeParty>
    

    Could you please consider adjusting the logic so that:

    • VAT number remains optional;
    • SIRET/company registration can identify the seller;
    • SellerTradeParty is still generated for VAT-exempt French micro-enterprises.

    This seems important with the upcoming French electronic invoicing requirements, as many small businesses will legitimately have no VAT number.

    Thank you.

    The page I need help with: [log in to see the link]

You must be logged in to reply to this topic.