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
Name | DataType | List Options | Description |
---|---|---|---|
paydate | date | The paydate for which the entry is being made | |
hourtype | lookup | The earnings code to use for the entry | |
hours | float | The number of hours during which the premium is earned, at the prescribed rate (e.g. at regular) | |
hoursot | float | The number of overtime hours during which the premium is earned; the rate will be upscaled using the ratios defined in the hourtype | |
rate | float | The rate of pay per hour for the premium | |
reference | string | This 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) | |
exception | string | Optional: set an exception abbreviation on the punch |