feat(invoiceintake): invoice@ mails become draft Eingangsrechnungen #82

Merged
sharang merged 3 commits from feat/invoice-intake into main 2026-10-20 08:15:33 +00:00
3 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 f20957c858 fix(invoiceintake): ERPNext's email account is named Eingangsrechnung
ci / shared (pull_request) Successful in 15s
ci / test (pull_request) Successful in 25m36s
ci / image (pull_request) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 09:49:36 +02:00
Sharang ParnerkarandClaude Opus 5.5 433baf3740 fix(erpsetup): intake marker links to the mail
ci / shared (pull_request) Successful in 14s
ci / test (pull_request) Successful in 25m31s
ci / image (pull_request) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 09:23:53 +02:00
Sharang ParnerkarandClaude Opus 5.5 5a6d9d26aa feat(invoiceintake): invoice@ mails become draft Eingangsrechnungen
ci / shared (pull_request) Successful in 15s
ci / test (pull_request) Successful in 25m30s
ci / image (pull_request) Skipped
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