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