Skip to content

[Invoices]: Implement FacturaeHandler XML generation (Facturae 3.2 — Spain) #782

Description

@nielsdrost7

Context

Sub-story of #767. FacturaeHandler (Facturae 3.2 — Spain) currently throws RuntimeException('... not yet implemented ...') instead of generating real XML.

Recommended package

josemmo/facturae-php (MIT, 680k+ installs, 286 stars, 1 open issue, actively maintained — v1.8.5 Aug 2026). Facturae is a genuinely distinct XML schema (not UBL/CII based), so this needs its own dedicated mapping work, unlike the UBL-family formats.

The package also supports XAdES signing and direct submission to Spain's FACe platform — out of scope for "generate the XML" but worth knowing it's there if ever needed.

Scope

Implement FacturaeHandler::generateXml() using josemmo/facturae-php's document builder, mapping our Invoice model fields to the Facturae 3.2 schema.

Acceptance criteria

  • FacturaeHandler::generateXml() returns real, well-formed Facturae 3.2 XML
  • Output passes PeppolXmlValidator
  • Unit test asserts well-formedness and key fields, following the PeppolBisHandlerTest pattern
  • FormatHandlersTest's unimplemented-formats test is updated to drop Facturae from the list

Sequencing note

Independent of the UBL-family and CII-family sub-stories — clear package, dedicated mapping work. See #767 for full package-research context.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinedRefined with SMART plan / test suggestions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions