Files
zugferd-service/tests/fixtures/MANIFEST.md
T
m3ta-chironandClaude Fable 5.2 7aa4506dd7 feat(extract): support plain XML invoices and UBL syntax
/extract now accepts all EN 16931 e-invoices, not only ZUGFeRD PDFs:

- plain XML files via the new xml_base64 field; XML sent as pdf_base64
  is detected from the content
- UBL 2.1 Invoice and CreditNote (XRechnung UBL, Peppol BIS Billing) via
  the new src/ubl_parser.py, also when embedded in a PDF
- new response field xml_syntax ("CII" or "UBL")
- CII invoice dates are normalized to YYYY-MM-DD, matching UBL
- XRechnung profiles are detected from the specification identifier,
  independent of the factur-x version (6.x reports them as EN16931)
- untrusted XML is parsed without entity or DTD resolution (XXE)

Fixtures: KoSIT XRechnung test-suite case 01.01a in CII and UBL.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 18:32:46 +01:00

75 lines
3.7 KiB
Markdown

# ZUGFeRD Test Fixture Manifest
This directory contains sample PDFs for testing ZUGFeRD extraction and validation.
## Files
| Filename | Profile | Description |
|-----------|----------|-------------|
| EN16931_1_Teilrechnung.pdf | EN16931 | Official FeRD test invoice - partial invoice (Teilrechnung) with full UN/CEFACT data |
| EN16931_Einfach.pdf | EN16931 | Official FeRD test invoice - simple invoice (Einfach) with UN/CEFACT data |
| attributeBasedXMP_zugferd_2p0_EN16931_Einfach.pdf | EN16931 | ZUGFeRD 2.0 EN16931 profile using attribute-based XMP metadata |
| zugferd_invoice.pdf | ZUGFeRD 1.0 | Basic ZUGFeRD v1.0 invoice (likely BASIC or COMFORT profile) |
| validAvoir_FR_type380_BASICWL.pdf | BASIC WL | French credit note (avoir) with BASIC WL profile |
| zugferd_2p1_EXTENDED_PDFA-3A.pdf | EXTENDED | ZUGFeRD 2.1 EXTENDED profile with PDF/A-3A conformance |
| validXRechnung.pdf | XRechnung | German XRechnung format (similar to EN16931 but German profile) |
| ZTESTZUGFERD_1_INVDSS_012015738820PDF-1.pdf | ZUGFeRD 1.0 | Historical ZUGFeRD v1.0 test invoice from 2015 |
| MustangBeispiel20221026.pdf | EN16931 | Modern sample from Mustang project (October 2022) |
| ORDER-X_EX01_ORDER_FULL_DATA-COMFORT.pdf | ORDER-X | Order-X format (related to ZUGFeRD but for orders) |
| EmptyPDFA1.pdf | None | Empty PDF/A-1 document - no ZUGFeRD data (negative test case) |
## Real-World Invoices (anonymized) - `real/`
Anonymized XML from real production invoices that once revealed service bugs.
Each file must contain **no real names, addresses, tax numbers, bank details,
or document numbers** (verified at creation time). Never commit original
invoice PDFs here.
| Filename | Profile | Origin bug |
|-----------|----------|------------|
| extended_fc_steuernummer_basisqty.xml | EXTENDED | FC-only tax registration ignored, unit price with basis quantity 100 misread, spaced VAT ID rejected, contact email dropped (2026-09) |
## Plain XML Invoices - `xml/`
Official KoSIT XRechnung test-suite business case 01.01a, the same invoice
in both syntaxes (source: https://github.com/itplr-kosit/xrechnung-testsuite,
Apache License 2.0).
| Filename | Profile | Syntax |
|-----------|----------|--------|
| xrechnung_01.01a_cii.xml | XRechnung 3.0 | CII |
| xrechnung_01.01a_ubl.xml | XRechnung 3.0 | UBL |
## Profile Coverage
- **MINIMUM**: Not covered (future addition)
- **BASIC**: Covered by `zugferd_invoice.pdf`
- **BASIC WL**: Covered by `validAvoir_FR_type380_BASICWL.pdf`
- **EN16931**: Covered by multiple samples
- **EXTENDED**: Covered by `zugferd_2p1_EXTENDED_PDFA-3A.pdf`
- **None (negative test)**: Covered by `EmptyPDFA1.pdf`
## Version Coverage
- ZUGFeRD 1.0: `ZTESTZUGFERD_1_INVDSS_012015738820PDF-1.pdf`, `zugferd_invoice.pdf`
- ZUGFeRD 2.0: `attributeBasedXMP_zugferd_2p0_EN16931_Einfach.pdf`
- ZUGFeRD 2.1: `zugferd_2p1_EXTENDED_PDFA-3A.pdf`
- XRechnung: `validXRechnung.pdf`
## Source URLs
- ZUGFeRD Mustang project: https://github.com/ZUGFeRD/mustangproject
- Library test resources: `library/src/test/resources/`
- Validator test resources: `validator/src/test/resources/`
- CLI test resources: `Mustang-CLI/src/test/resources/`
- FeRD test invoices: https://www.ferd-net.de/download/testrechnungen (URL was 404 - samples obtained from Mustang project)
- factur-x library tests: https://github.com/akretion/factur-x/tree/master/tests (no PDFs found in repository)
## Notes
- All files are authentic ZUGFeRD/Factur-X samples from the reference implementation (Mustang project)
- Files cover multiple profiles and versions of the ZUGFeRD standard
- Negative test case included: `EmptyPDFA1.pdf` is a valid PDF/A-1 but contains no ZUGFeRD XML data
- ORDER-X sample included for completeness, though it's a different but related format
- File sizes range from 38KB to 684KB