feat(accounting): allow cancelling serial invoice executions

This commit is contained in:
2026-10-02 18:48:06 +02:00
parent 7e6c2fbac5
commit fdcb9bfc1d
6 changed files with 269 additions and 87 deletions

View File

@@ -14,7 +14,7 @@ export const serialExecutions = pgTable("serial_executions", {
tenant: bigint("tenant", { mode: "number" })
.notNull()
.references(() => tenants.id), executionDate: timestamp("execution_date").notNull(),
status: text("status").default("draft"), // 'draft', 'completed'
status: text("status").default("draft"), // generating, draft, processing, cancelling, cancelled, completed, error
createdBy: text("created_by"), // oder UUID, je nach Auth-System
createdAt: timestamp("created_at").defaultNow(),
summary: text("summary"), // z.B. "25 Rechnungen erstellt"