Skip to main content

prepare_payroll_draft

PostgREST stored procedure — POST /rest/v1/rpc/prepare_payroll_draft.

Call it through the Supabase client (RLS and the service role are enforced by the function):

const { data, error } = await supabase.rpc('prepare_payroll_draft', { p_company_id, p_payments, p_period_end, p_period_start, p_prepared_by, p_total_centavos });

Arguments

ArgumentTypeRequired
p_company_iduuidyes
p_paymentsjsonbyes
p_period_enddateyes
p_period_startdateyes
p_prepared_byuuidyes
p_total_centavosbigintyes

Generated from specs/supabase.json. The function's behaviour is defined by its SQL migration; this page documents its call signature only.