Function: generateDraftInvoice()
generateDraftInvoice(
facilityId,weekStartIso):Promise<{invoiceNumber:string;ok:true; } | {error:string;ok:false; }>
Defined in: src/server/actions/invoicing.ts:135
Owner-only: create the draft invoice for a facility's week from the cockpit (contracted-hours engine; no number/lock/send yet). Thin wrapper over generateAndStoreInvoice so the run table can turn a "ready" facility into a sendable draft in one click.
Parameters
facilityId
string
weekStartIso
string
Returns
Promise<{ invoiceNumber: string; ok: true; } | { error: string; ok: false; }>