Skip to main content

Overview

Inserts a new set of payroll parameters into tab_pmtros with company settings and legal values.

Signature

fun_insert_pmtros(
    wnom_empresa VARCHAR,
    wind_perio_pago CHAR(1),
    wval_smlv NUMERIC,
    wval_auxtrans NUMERIC,
    wind_num_trans INTEGER,
    wano_nom INTEGER,
    wmes_nom INTEGER,
    wval_por_intces NUMERIC,
    wnum_diasmes INTEGER
) RETURNS VOID

Parameters

wnom_empresa
VARCHAR
required
Company name
wind_perio_pago
CHAR(1)
required
Payment period: ‘Q’ (biweekly) or ‘M’ (monthly)
wval_smlv
NUMERIC
required
Minimum wage value (SMLV)
wval_auxtrans
NUMERIC
required
Transportation allowance value
wind_num_trans
INTEGER
required
Number of transportation allowances
wano_nom
INTEGER
required
Payroll year
wmes_nom
INTEGER
required
Payroll month
wval_por_intces
NUMERIC
required
Interest percentage for severance
wnum_diasmes
INTEGER
required
Number of days in the month

Returns

VOID (no return value)

Example Usage

-- Insert payroll parameters
SELECT fun_insert_pmtros(
    'MAYASOFT',
    'Q',
    1420000,
    200000,
    2,
    2025,
    1,
    12,
    30
);

Validation Rules

  • Company name cannot be NULL
  • Payment period must be ‘Q’ or ‘M’
  • All numeric values must be positive
  • Year must be valid
  • Month must be between 1-12

Source

source/func/pmtros/fun_insert_pmtros.sql

Build docs developers (and LLMs) love