feat(invoices): surface monthly/manual accumulator drafts in the Bills list

Manual/monthly-cadence customers accumulate logged hours into one running
draft invoice (is_monthly_draft, migration 128). That draft gets a real
invoice number and stamps the hours ("Billed: R-2026-0026"), but listInvoices
hid is_monthly_draft rows from the main list — so the invoice looked lost even
though it existed on the customer's monthly-queue card. It also carried status
'scheduled' despite never auto-sending on manual cadence, reading misleadingly
as "Scheduled".

- Bills list now opts into drafts via a new `includeDrafts` query param
  (GET /admin/invoices → listInvoices includeMonthlyDrafts). Pickers/sub-lists
  that reuse billsService.list leave it off, so they're unaffected.
- Draft rows render a distinct "Draft" badge instead of "Scheduled"
  (transformInvoice already exposes isMonthlyDraft).
- The hours "Billed: R-…" chip now links straight to its invoice.
- i18n: bills.status.draft (de "Entwurf", en "Draft").
This commit is contained in:
Luca
2026-06-29 19:39:40 +02:00
parent b9d91385b4
commit e457656b9d
6 changed files with 52 additions and 14 deletions
+1
View File
@@ -4666,6 +4666,7 @@
"bills": {
"status": {
"scheduled": "Geplant",
"draft": "Entwurf",
"pending_delivery": "Wartet auf Lieferung",
"sent": "Gesendet",
"paid": "Bezahlt",
+1
View File
@@ -4810,6 +4810,7 @@
},
"status": {
"scheduled": "Scheduled",
"draft": "Draft",
"pending_delivery": "Awaiting delivery",
"sent": "Sent",
"paid": "Paid",