backfill_invoice
PostgREST stored procedure — POST /rest/v1/rpc/backfill_invoice.
Call it through the Supabase client (RLS and the service role are enforced by the function):
const { data, error } = await supabase.rpc('backfill_invoice', { p_company_id, p_created_by, p_due_date, p_facility_id, p_invoice_number, p_issue_date, p_lines, p_period_end, p_period_start, p_total_cents });
Arguments
| Argument | Type | Required |
|---|---|---|
p_company_id | uuid | yes |
p_created_by | uuid | yes |
p_due_date | date | yes |
p_facility_id | uuid | yes |
p_invoice_number | text | yes |
p_issue_date | date | yes |
p_lines | jsonb | yes |
p_period_end | date | yes |
p_period_start | date | yes |
p_total_cents | bigint | yes |
Generated from
specs/supabase.json. The function's behaviour is defined by its SQL migration; this page documents its call signature only.