Abrechnen nur über die Abrechnungsübersicht, solange das Modul aktiv ist

Direkter Übergang nach billed → invalid use_billing_overview (nach der Rechteprüfung),
Button im Auftragsdetail ausgeblendet, markBilled läuft über den Abrechnungseintrag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 10:53:16 +02:00
co-authored by Claude Opus 5
parent 8324c48178
commit 6b8cdf543b
6 changed files with 106 additions and 4 deletions
+6
View File
@@ -53,6 +53,12 @@ const needsReason = (from: WorkOrderStatus, to: WorkOrderStatus) =>
async function main() {
await cleanupTenants([SLUG]);
const f = await createFixture(SLUG);
// role × transition table incl. the direct `billed` transition → billing overview module off (guard: test-billed-guard)
await prisma.tenantModule.upsert({
where: { tenantId_moduleKey: { tenantId: f.tenantId, moduleKey: "billing" } },
update: { enabled: false },
create: { tenantId: f.tenantId, moduleKey: "billing", enabled: false },
});
console.log("\n— (1) Übergangstabelle —");
let tableOk = true;