Skip to content

feat(invoicing): add FatturaPA XML export and SDI transmission - #875

Merged
evilguy4000 merged 4 commits into
developfrom
feat/fatturapa-sdi
Nov 14, 2026
Merged

evilguy4000 merged 4 commits into
developfrom
feat/fatturapa-sdi

Conversation

@evilguy4000

Copy link
Copy Markdown
Collaborator

Summary

  • Add Italian FatturaPA 1.2 XML export (FPR12 B2B / FPA12 PA) with XSD-backed validation
  • Send invoices via a configurable generic HTTP SDI adapter, track transmissions (RC/NS/MC/NE/DT), and poll non-final status every 15 minutes
  • Wire client/invoice/admin UI, API hooks, migration 209, Italian i18n, docs, and tests

Test plan

  • Apply migration 209 on a clean Postgres stack
  • Create an Italian client with codice destinatario / PEC / CF and export FatturaPA XML from an invoice
  • Confirm FPR12 vs FPA12 selection from recipient code length
  • Configure SDI adapter URL in admin and send a test transmission (mock or staging intermediary)
  • Confirm transmission status updates and scheduled poll for non-final states
  • Run pytest tests/test_fatturapa.py tests/test_fatturapa_routes.py tests/test_sdi_service.py

Support Italian e-invoicing with FPR12/FPA12 export, a generic HTTP SDI adapter, transmission tracking/polling, admin UI, docs, and tests.
Comment thread app/routes/api_v1_invoices.py Fixed
Comment thread app/routes/api_v1_invoices.py Fixed
Comment thread app/routes/invoices.py Fixed
Comment thread app/routes/invoices.py Fixed
Comment thread app/routes/invoices.py Fixed
Comment thread app/utils/fatturapa.py Fixed
Comment thread app/utils/fatturapa.py Fixed
Comment thread app/utils/fatturapa.py Fixed
Format FatturaPA/SDI files with black for CI lint, stop echoing exception text to clients, and document intentional empty excepts.
CI lint failed after black because isort still needed to reorder imports in the new SDI files.
CI trailing-whitespace hook rewrote the vendor schema fixtures; commit the cleaned copies so lint stays green.
@evilguy4000
evilguy4000 merged commit 1d97a7b into develop Nov 14, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants