Skip to main content

INSERT_PREMIUM

Inserts or updates a system generated timesheet entry (e.g. for shift premium); handles updating, deleting. Allows automatic generation of overtime calculations on the premium rate

Example Usage

INSERT_PREMIUM("2022-03-21", "SHIFT", 7, 0, 1, 7.00, "SH2")  -> records $7.00 to earnings code "SHIFT"
INSERT_PREMIUM("2022-03-21", "SHIFT", 7, 2.5, 1.5, 16.13, "SH3") -> records $16.13 to earnings code "SHIFT" with 7hrs @ $1.50 and 2.5hrs @ $2.25 (assuming a 1.5 overtime ratio)

Overview

Function signature
INSERT_PREMIUM(paydate, hourtype, hours, hoursot, rate, reference, exception)

Category
Database

Return data type
bool

Arguments

NameDataTypeList Options                          Description
paydatedateThe paydate for which the entry is being made
hourtypelookupThe earnings code to use for the entry
hoursfloatThe number of hours during which the premium is earned, at the prescribed rate (e.g. at regular)
hoursotfloatThe number of overtime hours during which the premium is earned; the rate will be upscaled using the ratios defined in the hourtype
ratefloatThe rate of pay per hour for the premium
referencestringThis is a unique reference which will allow multiple monetary items to be added to a given day (e.g. "2NDSHIFT" and "3RDSHIFT" for separate shift premiums)
exceptionstringOptional: set an exception abbreviation on the punch