Files
tenant-registry/internal/server
Sharang ParnerkarandClaude Opus 5.5 145b79ad22
ci / shared (pull_request) Successful in 13s
ci / test (pull_request) Successful in 23m48s
ci / image (pull_request) Skipped
feat(erp): overdue invoices drive the ladder from the reconcile pass
Live ERPNext marks invoices Overdue in a nightly bulk update that fires
no document event, so the sales_invoice.overdue webhook never arrives.
Every reconcile (15 min) now lists the customer's submitted invoices with
an open amount and a due date before today (Europe/Berlin); the oldest
one sets the rung (warning, restricted after 14 days, halted after 30),
with the same rules as the webhook (shared overdueStep). When no invoice
is open any more and the status came from the ladder, the tenant goes
back to active, which covers payments matched by Zahlungsabgleich (no
event). A status set by staff is left alone.

The erpmock list understands < and > filters.

Fixes #50

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-09-30 12:41:47 +02:00
..