Skip to main content

Overview

Updates all fields of existing payroll parameters in tab_pmtros.

Signature

fun_update_pmtros(
    wid_empresa INTEGER,
    wnom_empresa VARCHAR,
    wind_perio_pago CHAR(1),
    wval_smlv NUMERIC,
    wval_auxtrans NUMERIC,
    wind_numtrans INTEGER,
    wano_nom INTEGER,
    wmes_nom INTEGER,
    wval_por_intces NUMERIC,
    wnum_diasmes INTEGER
) RETURNS VOID

Parameters

wid_empresa
INTEGER
required
Company ID to update
wnom_empresa
VARCHAR
required
New company name
wind_perio_pago
CHAR(1)
required
New payment period
wval_smlv
NUMERIC
required
New minimum wage value
wval_auxtrans
NUMERIC
required
New transportation allowance
wind_numtrans
INTEGER
required
New number of transportation allowances
wano_nom
INTEGER
required
New payroll year
wmes_nom
INTEGER
required
New payroll month
wval_por_intces
NUMERIC
required
New interest percentage
wnum_diasmes
INTEGER
required
New number of days in month

Returns

VOID (no return value)

Example Usage

-- Update payroll parameters
SELECT fun_update_pmtros(
    2,
    'FC actualizada',
    'Q',
    1420000,
    200000,
    2,
    2025,
    1,
    12,
    30
);

Validation Rules

  • Company ID must exist
  • Payment period must be ‘Q’ or ‘M’
  • All numeric values must be positive
  • Month must be between 1-12

Source

source/func/pmtros/fun_update_pmtros.sql

Build docs developers (and LLMs) love