Files
tenant-registry/cmd/invoiceintake
Sharang ParnerkarandClaude Opus 5.5 5a6d9d26aa
ci / shared (pull_request) Successful in 15s
ci / test (pull_request) Successful in 25m30s
ci / image (pull_request) Skipped
feat(invoiceintake): invoice@ mails become draft Eingangsrechnungen
New cmd/invoiceintake (orca-infra #121, Collectives ERP/08). It reads the
mails of ERPNext's Email Account "Eingangsrechnungen" through the REST API
(no IMAP of its own; Strato forwards the originals to DUO) and, per mail:

- e-invoice (XML first, then PDF): E Invoice Import draft, eu_einvoice
  reads and validates it; the person maps and creates the Purchase Invoice
- other PDF: draft Purchase Invoice for the supplier matched by sender
  address or domain, one placeholder line, the original attached again
- no PDF/XML, unknown sender, or a refused draft: a ToDo on the mail

It never submits, changes or deletes anything and keeps no state: done
mails are read back from ERPNext (intake_communication, unique; ToDo
reference). A cancelled ToDo asks for another try. Dry run with -once
-dry-run; logs carry document names and counts, no senders or subjects.

erpsetup gains the two marker fields, the placeholder item EINGANGSRECHNUNG
(unit Stück, group Eingangsrechnungen) and its expense account SKR04 6300.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 09:19:00 +02:00
..