Skip to content

Implement country-specific PEPPOL validation rules #33

@fank

Description

@fank

Summary

Implement country-specific validation rules for PEPPOL BIS Billing 3.0 (DK, IT, NL, NO, SE).

Background

PR #32 added foundational PEPPOL support with 84 auto-generated rules, but only implemented 5 core rules. The remaining 79 rules include important country-specific validations that need to be implemented.

Country-Specific Rules

Denmark (DK-R-*)

  • DK-R-002: Legal entity requirement
  • DK-R-003: ItemClassification UNSPSC version
  • DK-R-004 through DK-R-016: Various Danish supplier requirements

Italy (IT-R-*)

  • IT-R-001: Seller tax registration identifier format (11-16 chars)
  • IT-R-002: Postal address line 1 required
  • IT-R-003: City required
  • IT-R-004: Post code required

Netherlands (NL-R-*)

  • NL-R-001 through NL-R-009: Dutch supplier and credit note requirements

Norway (NO-R-*)

  • NO-R-001: VAT number format validation
  • NO-R-002: "Foretaksregisteret" requirement

Sweden (SE-R-*)

  • SE-R-001 through SE-R-013: Swedish VAT number and organization number validations

Implementation

The rules are already defined in rules/peppol.go. Need to:

  1. Implement validation logic in check_peppol.go
  2. Detect seller/buyer country from postal address or VAT registration
  3. Apply country-specific rules conditionally
  4. Add comprehensive test coverage for each country

References

Related

Part of #24 (PEPPOL BIS Billing 3.0 support)
Depends on #32

Metadata

Metadata

Assignees

No one assigned

    Labels

    PEPPOLPEPPOL BIS Billing 3.0 validation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions