Skip to content

[Invoices]: Implement EhfHandler XML generation (EHF 3.0 — Norway) #780

Description

@nielsdrost7

Context

Sub-story of #767. EhfHandler (EHF 3.0 — Norway) currently throws RuntimeException('... not yet implemented ...') instead of generating real XML.

Recommended package

Likely num-num/ubl-invoice (already a dependency — installed for #767's default format). EHF is a UBL 2.1 profile with Norwegian-specific customization/profile IDs and additional mandatory fields, not a different XML syntax.

This needs a research spike first: confirm num-num/ubl-invoice's field coverage actually satisfies the real EHF 3.0 specification (customization ID, mandatory party identifiers) before committing to it. Flag as "probably yes, verify against spec," not confirmed.

Scope

  1. Research spike: verify num-num/ubl-invoice covers EHF 3.0's mandatory fields
  2. Implement EhfHandler::generateXml(), likely reusing most of PeppolBisHandler's object graph with EHF-specific customization/profile IDs

Acceptance criteria

  • Research spike findings documented (does the library cover EHF 3.0, or is a different approach needed?)
  • EhfHandler::generateXml() returns real, well-formed EHF 3.0 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 EHF from the list

Sequencing note

Pair with #781 — same research spike question (does num-num/ubl-invoice cover this national UBL profile?) applies to both. 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