Files
tenant-registry/cmd/invoiceintake
Sharang ParnerkarandClaude Opus 5.5 36a30e206d
ci / shared (pull_request) Successful in 13s
ci / test (pull_request) Successful in 26m10s
ci / image (pull_request) Skipped
feat(invoiceintake): send every invoice mail on to DATEV from invoice@
DATEV Unternehmen Online takes receipts by mail only from registered
senders. Strato forwarded invoice@ with the supplier as sender, so DATEV
rejected every invoice that came straight from a supplier (backlog t60).

With INTAKE_DATEV_ADDRESS set, the intake sends each invoice mail received
on or after INTAKE_DATEV_SINCE on to that address, from invoice@, through
ERPNext (communication.email.make). The sent mail replies to the received
one (in_reply_to): that is the marker, it shows in the mail's timeline,
and ERPNext's Email Queue retries a failed send. An XRechnung goes as XML
only, so its PDF rendering doesn't become a second receipt. DATEV's own
answers and bounces are never forwarded; they become ToDos with their own
reason instead of "no PDF". A failed forward doesn't stop the drafts, and
the other way round.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:32:23 +01:00
..