Standard steps
This page lists every rule in the standard policy package that ships
with Hour Advantage Time and Attendance. For each step it gives what the
step does, the settings (parameters) it takes with their defaults, and
an example. Use it when you set up a policy’s layers or read a recipe.
No standard step applies on its own. A layer turns a step on
(uses = "standard/<step>") and gives its parameters. Later layers, for a
jurisdiction, a contract or a group of people, can change those parameters
(change = "params"), add a step before another, or turn one off. See
policy layers. The policy
cookbook has a tested recipe for every step.
The scenario catalogue lists
the scenarios that prove each parameter and its default.
[[layer]]id = "overtime"[[layer.step]]id = "weekly"uses = "standard/threshold"params = { over = "40h", to = "overtime", window = "week", counts = ["work"] }How steps are given their parameters
Section titled “How steps are given their parameters”-
Checked when published. Each step declares the parameters it takes: type, default, whether it is required, and which must go together. Adding a layer or publishing a policy package fails (400) when a layer gives a step any of these:
- a parameter it doesn’t take,
- a value of the wrong kind,
- a combination it refuses,
- a change to one step twice (one change would be lost).
The error names the step, the layers that gave it and the parameter:
step daily (standard/threshold, given by tenant rev 1, us-ca rev 2): parameter over: '8 hrs' is not a duration -
Defaults. A step runs with every parameter you leave out set to its default.
-
Values. Durations are text (
"7h 30m","15m"). Wall times are"HH:MM". Dates are"YYYY-MM-DD". Days of the year are"MM-DD". Money is whole minor units (250is 2.50). -
Every step’s parameters. These are
windowandside.windowisday,week,periodor24h, for a step of theallocateoraccruestage. It can also be a repeating window of whole days, for a contract’s own cycle, such as{ every = "2w", starts = "2026-01-05" }. A repeating window’s reasons name it by its length, “over 80h in the 2 weeks”.sideispay, or a bill side: see pay and bill.- Any other window is refused when the policy is published. A set or a rolling period does not divide the days into windows.
-
Periods. Wherever a step names a year, dates, ranges of dates or hours of the day, it takes one value, a period.
-
counts. Many steps takecounts. It lists the categories whose time they count. Without it they count every category that is worked.
Periods
Section titled “Periods”A period is one value for a set of exact instants. The instants are written as stretches, each from a start up to a finish. One continuous year is a set of one stretch. A weekend’s nights are a set of many. Wherever a step takes a year, dates, a range of dates or hours of the day, it takes a period.
| Kind | Written | What it holds |
|---|---|---|
| Dates | { dates = ["2026-12-25"] } | whole days, midnight to midnight in the zone in force that day |
| Ranges | { ranges = [{ from = "2026-10-12", to = "2026-10-16" }] } | runs of whole days |
| Times | { times = [{ start = "2026-07-04T18:00", finish = "2026-07-05T02:00" }] } | wall times |
| Daily | { daily = { from = "22:00", to = "06:00" } } | each day’s hours, into the next day where to is at or before from |
| Weekdays | { weekdays = ["sat", "sun"] } | whole days of those weekdays |
| Repeating | { every = "1y", starts = "01-01" } | the occurrence holding the day asked about |
| The engine’s calendars | "workday", "workweek", "pay_period" | the one holding it, as the policy’s settings have them |
| Rolling | { last = "12mo" }, { next = "14d" } | up to, or from, the day or instant asked about |
| Combined | { all = [...] }, { any = [...] }, { except = a, from = b } | what all hold, what any holds, b less a |
- Lengths are a whole number and a unit.
mandhare exact minutes and hours.d,w,moandyare calendar days, weeks, months and years. Each boundary is at midnight in the zone in force on its date. A month counted from the 31st is the last day of a shorter month. A year from February 29 starts on February 28 in other years. startsis one of these:- a date,
- a month and day of every year (
"07-01", for a length a year divides into), "hire"(the person’s latest hire on or before the day asked about),"leave_year"(the settingaccruals.leave_year_starts).
- Hours of the day and weekdays repeat without end. They are cut to
the rest of an
allthey are in (the weekends of a year). Otherwise they are cut to the step’s window. - Each is checked when the policy is published, as every parameter is.
The weekend-night premium, for example, is one all of weekdays and
hours of the day.
Every line says why
Section titled “Every line says why”A step that changes time stamps the line with the rule that fired. The form
is <step id> [<layers>]: <what was done>: <the rule>:
daily [tenant rev 1, us-ca rev 2]: moved 4h from work to overtime: over 8h in the dayReasons in any language
Section titled “Reasons in any language”Beside its English words, every reason carries a stable key and the
values that fill it in. Your app can use them to show the reason in the
person’s own language, from its own wording of each key. A step’s key is
<package>/<step>.<rule>. Its values are those its words name.
- A stamp’s
actionsays what was done (movedwithtime,fromandto;added_time,added_quantity,set_start,matched,earned). Itsreasonsays the rule that fired (standard/threshold.overwithoverandwindow). - An exception’s
reasonis the rule of the step that raised it. Or it is the engine’s own kind, with the values of what it is about (context_not_allowedwithdimensionandvalue). - A leave request refused by a leave rule has its
reason(standard/leave_balance.floor), also inleave.decided. A subject an approval rule blocked has itsreason. A late change refused has its exception’sreason, with the change’sdayandperiod.
Durations are in milliseconds. window is the window’s code: day,
week, period, 24h, or a repeating window’s length such as 2w. The
standard steps always name a rule. A step of your own that gives its own
words has no key.
{ "step": "daily", "layers": "tenant rev 1", "did": "moved 2h from work to overtime: over 8h in the day", "action": { "key": "moved", "values": { "time": "7200000", "from": "work", "to": "overtime" } }, "reason": { "key": "standard/threshold.over", "values": { "over": "8h", "window": "day" } } }Every minute explained shows what else a line records and how to trace it back to the punch.
The steps by stage
Section titled “The steps by stage”A policy’s steps run in a fixed order of stages. Within a stage, they run in the order the layers give them.
| Step | Stage | Does |
|---|---|---|
observe | holiday | Where a weekend holiday is observed. |
location_holidays | holiday | Observes a holiday only where the person’s location lists it. |
substitute_day | holiday | Moves a holiday on a weekend to the next weekday no holiday takes. |
substitute_day_unless_scheduled | holiday | Moves a weekend holiday unless the person is rostered that day. |
leave_balance | leave | Refuses leave that would take the balance below a floor. |
leave_balance_below | leave | Refuses leave once the balance has gone below an amount a number of times. |
leave_balance_first | leave | Refuses or flags leave while paid time off is left to use first. |
leave_blackout | leave | Refuses leave on days in a period. |
leave_notice | leave | Flags leave asked for with short notice. |
leave_route | leave | Sends a stage of a long leave request to another approver. |
leave_entitlement | leave | Refuses or flags protected leave past an entitlement in weeks. |
leave_eligibility | leave | Refuses or flags protected leave without enough service and hours. |
leave_waiting_period | leave | Refuses leave in a waiting period from hire. |
leave_increment | leave | Refuses leave not in whole increments. |
leave_days_within | leave | Refuses leave past a number of days in a period. |
leave_days_per_request | leave | Refuses a request of more days than its value allows. |
lockout | pair | Ignores duplicate punches. |
join | pair | Joins an out and an in a moment apart. |
gap_lunch | pair | Takes an out and an in a short time apart as a lunch, whatever the clock. |
direction | pair | Gives a direction to punches that have none. |
longest_shift | pair | Flags, or closes, work with a forgotten clock-out. |
device_allowed | pair | Flags a punch made on a device the person is not set up for. |
match | match | Which scheduled shift work belongs to. |
assign | assign | Which assignment ambiguous work goes to. |
attribute | attribute | Which workday an overnight shift belongs to, or splits it. |
round | time | Rounds punches, or snaps them to the shift. |
grace | time | Takes punches near a shift’s start or end at it. |
rate_tie | rate | Which of two equally close rates applies. |
rate_by_hours | rate | Picks the rate of the rung the hours to date reached. |
threshold | allocate | Moves time over an amount to another category, in tiers if asked. |
one_longer_day | allocate | Moves each day’s time past a limit, with one longer day a week. |
consecutive_day | allocate | Moves the time of the Nth consecutive day worked. |
after_schedule | allocate | Moves time worked past the day’s schedule. |
unscheduled_day | allocate | Moves the time of a day with no scheduled shift. |
window_premium | allocate | Moves time between two wall times to another category. |
window_premium_run_on | allocate | As window_premium, and the work that runs on past the period. |
premium | allocate | Moves time on given weekdays, holidays or work to another category. |
auto_meal | allocate | Deducts a meal from a long day with none taken. |
meal_premium | allocate | Pays a premium for a meal not started in time. |
second_meal_premium | allocate | Pays a premium for a second meal not started in time. |
rest_break_premium | allocate | Pays a premium for fewer rest breaks than due. |
attested_break_premium | allocate | Pays a premium for a break the attestation says was missed. |
attested_meal_waiver | allocate | Takes back a meal premium for a waived meal. |
minimum_pay | allocate | Tops work up to a minimum: reporting, call-back, each call-out. |
minimum_engagement | allocate | Tops an engagement up to a minimum. |
split_shift | allocate | Pays a premium for a day split by a long gap. |
split_shift_pay | allocate | Pays a split shift premium as money at the minimum rate. |
split_shift_allowance | allocate | Pays an amount once for a day split by a long gap. |
spread_of_hours | allocate | Moves time worked past a spread from the day’s first work. |
shortened_hour | allocate | Adds time for hours shorter than an hour, such as a night hour. |
shortened_hour_run_on | allocate | As shortened_hour, and the work that runs on past the period. |
short_rest | allocate | Moves time worked within a short rest of the last shift. |
short_rest_pay | allocate | Pays an amount for a day started within a short rest. |
schedule_change_pay | allocate | Pays for a shift changed with short notice. |
long_break | allocate | Moves or flags breaks that run long. |
holiday_pay | allocate | Pays a holiday as time not worked. |
holiday_attendance | allocate | Holds back holiday pay when the days around it were not worked. |
holiday_pay_if_present_before | allocate | Holds back holiday pay unless the person was present the workday before. |
holiday_pay_from_earnings | allocate | Pays a holiday from the earnings of the weeks before. |
holiday_pay_otherwise_working | allocate | Pays a holiday not worked on a day the person would have worked. |
holiday_average_daily_pay | allocate | Pays a holiday not worked at average daily pay. |
alternative_holiday | allocate | Adds a day in lieu for a holiday worked. |
limit | allocate | Raises an exception past an amount of time. |
work_during | allocate | Raises an exception for work in hours it may not be in. |
average_limit | allocate | Raises an exception when weekly hours average over a limit. |
monthly_average_limit | allocate | Raises an exception when months of time average over a limit. |
weekly_rest | allocate | Raises an exception when a week has too little rest. |
piece_rate | allocate | Pays counts at a fixed amount or a matched rate. |
productivity_bonus | allocate | Pays a bonus an hour on days at a rate of units an hour. |
allowance | allocate | Pays an amount an hour: a differential, an allowance, standby. |
earnings | allocate | Prices hours at the rate their work matches, with premiums. |
tip_credit | allocate | Makes up what the cash wage and tips leave short of a minimum. |
regular_rate | allocate | Pays overtime premium on the week’s regular rate. |
spread_overtime_premium | allocate | Spreads the overtime premium over where the hours were worked. |
spread_overtime_hours | allocate | Spreads the overtime hours over where the hours were worked. |
minimum_wage | allocate | Makes up what hours paid fall short of a minimum rate. |
minimum_wage_and_overtime | allocate | Makes hours up to a host country’s minimum and overtime premium. |
percent_premium | allocate | Pays a per cent of the rate for hours in a period or on holidays. |
percent_of_pay | allocate | Adds a per cent of the period’s pay, such as rolled-up holiday pay. |
rest_days_share | allocate | Pays a weekly rest from the window’s pay over its working days. |
prevailing_wage | allocate | Makes hours up to a prevailing rate and pays the fringe in cash. |
leave_make_up_pay | allocate | Pays leave, such as jury duty, up to scheduled pay. |
leave_average_pay | allocate | Pays leave at average hourly pay. |
leave_weekly_pay | allocate | Pays leave at the greater of ordinary and average weekly pay. |
leave_rostered_penalties | allocate | Pays leave at the greater of its loading and the roster’s penalties. |
leave_waiting_days | allocate | Moves the first days of a period of incapacity to another category. |
comp_time | allocate | Moves overtime into a compensatory time bank. |
full_time_monthly | allocate | Reports each month’s hours of service and full-time status. |
full_time_look_back | allocate | Reports a measurement period’s average hours and full-time status. |
days_present | allocate | Reports the days present in each country, and flags a count. |
time_share | allocate | Flags a share of time worked in a country. |
accrue | accrue | Earns time off for time worked, or by years of service. |
grant | accrue | Gives a year’s time off at once. |
carryover | accrue | Forfeits a balance over a limit as the year starts. |
earn_limit | accrue | Forfeits what is earned past a limit in a year. |
carryover_payout | accrue | Pays out a balance over a limit as the year starts. |
payout_on_leaving | accrue | Pays out what is left of a balance on the last day employed. |
payout_unused_after | accrue | Pays out time off not used within a period of earning it. |
accrue_per_day | accrue | Earns time off for each day worked. |
accrue_beyond | accrue | Earns time off for what a counter earned past an amount in a year. |
earned_over | accrue | Raises an exception when a year’s earnings pass an amount. |
time_account | accrue | Earns hours over or under a target into a time account. |
balance_limit | accrue | Raises an exception when a balance is over or under a limit. |
late | exceptions | Raises late. |
early | exceptions | Raises left_early. |
no_show | exceptions | Raises no_show. |
rest | exceptions | Raises rest_too_short. |
missed_break | exceptions | Raises missed_break. |
break_time | exceptions | Raises an exception for too little break time in a long day. |
attestation_required | exceptions | Raises an exception for a day with no break attestation. |
flag | exceptions | Raises an exception on every day worked. |
late_changes | late | Adjusts small changes to a closed period, refuses large or late ones. |
approval | approve | What blocks approval, and who approves each stage. |
csv | export | Writes a pay period’s hours as CSV. |
certified_payroll | export | Writes a certified payroll for one project as CSV. |
daily_record | export | Writes each day’s start and end of work as CSV. |
Holidays and leave
Section titled “Holidays and leave”observe
Section titled “observe”Decides where a holiday that falls on a weekend is observed.
| Parameter | Default | |
|---|---|---|
saturday, sunday | the holiday’s own observed | Where a holiday falling on that day goes. "friday" is the Friday before. "monday" is the Monday after. "as_is" is the day itself. "none" is not observed. |
holidays | every holiday | The holiday ids it applies to. |
[[layer.step]]id = "observe"uses = "standard/observe"params = { saturday = "friday", sunday = "monday" }The cookbook’s holiday observance moves a Saturday holiday to the Friday before and a Sunday one to the Monday after.
location_holidays
Section titled “location_holidays”Observes a holiday only where the person’s work location lists it. A
location lists the holidays it keeps in its metadata, under key, as holiday
ids. A location with no list, and a person at no location, observe every
holiday. Run it after the steps that say which holidays are observed at
all.
| Parameter | Default | |
|---|---|---|
key | holidays | The metadata key that holds the location’s list of holiday ids. |
[[layer.step]]id = "where"uses = "standard/location_holidays"The recipe shows a common way to keep one list of holidays. Each location’s data says which of them it keeps. Check the holiday rules where you operate. See the cookbook’s public holidays by location.
substitute_day
Section titled “substitute_day”Moves a holiday observed on one of the weekdays in days. It goes to the
next day that is not one of them and that no other holiday takes. Holidays
are taken in the order of the days they fall on. So two holidays on one
weekend take the two days after it. Run it after the steps that say which
holidays are observed at all.
| Parameter | Default | |
|---|---|---|
days | ["saturday", "sunday"] | The weekdays a holiday is moved off. It names 1 to 6 weekdays. |
holidays | every holiday | The holiday ids it applies to. |
[[layer.step]]id = "substitute"uses = "standard/substitute_day"The recipe shows a common way to give a substitute weekday for a holiday that falls on a weekend. Check the holiday rules where you operate. See the cookbook’s public holidays by location.
substitute_day_unless_scheduled
Section titled “substitute_day_unless_scheduled”Does what substitute_day does, with one exception. A
holiday on a day the person’s roster has a shift on stays there. The
substitutes are those every holiday moving would take. A holiday that stays
does not free its day for another. This is the Monday observance of some
countries’ holidays.
| Parameter | Default | |
|---|---|---|
days | ["saturday", "sunday"] | The weekdays a holiday is moved off. |
holidays | every holiday | The holiday ids it applies to. |
[[layer.step]]id = "mondayise"uses = "standard/substitute_day_unless_scheduled"params = { holidays = ["christmas", "boxing-day", "new-year", "day-after-new-year", "waitangi-day", "anzac-day"] }The recipe shows a common way to move a weekend holiday for those not rostered that day. Check the holiday rules where you operate. See the cookbook’s New Zealand Holidays Act.
Leave rules
Section titled “Leave rules”These steps run when a leave request is
recorded. When a request breaks its rule, each step refuses the request,
flags it for the approver, or routes a stage of it. A refusal carries the
rule’s reason, such as standard/leave_balance.floor. The recipes for
jurisdiction-specific rules show a common way to set them up. Check the
rules where you operate.
leave_balance
Section titled “leave_balance”Refuses a leave request that would leave the balance below floor.
| Parameter | Default | |
|---|---|---|
balance | none | Maps each leave category to the accrual category it draws on: { sick = "sick" }. A leave category it does not list is not checked. |
floor | 0h | The lowest the balance may go. "-40h" allows as much as 40 hours negative. |
[[layer.step]]id = "floor"uses = "standard/leave_balance"params = { balance = { pto = "pto" }, floor = "-40h" }See the cookbook’s balance below once a year and accrual waiting period.
leave_balance_below
Section titled “leave_balance_below”Refuses a leave request that would leave the balance below below. It does
so once the balance has already gone below it times times, in the period
within that holds the request’s first day.
| Parameter | Default | |
|---|---|---|
balance | none | As in leave_balance: each leave category and the accrual category it draws on. A leave category it does not list is not checked. |
below | 0h | The balance the request may not go under. |
times | 1 | How many times the balance may have gone under it already. |
within | the calendar year | A period: a repeating one (starts = "hire" or "leave_year" for each anniversary or leave year), or { last = "12mo" }. |
[[layer.step]]id = "below"uses = "standard/leave_balance_below"params = { balance = { pto = "pto" }, below = "0h", times = 1, within = { every = "1y", starts = "01-01" } }See the cookbook’s balance below once a year.
leave_balance_first
Section titled “leave_balance_first”Refuses a request in a leave category of balance while the accrual
category named for it still has time left. The paid leave is used first.
With flag, the request is raised as leave_balance_unused instead of
refused.
| Parameter | Default | |
|---|---|---|
balance | required | Maps each leave category to the accrual category that is used first: { fmla = "pto" }. |
flag | false | true: raise leave_balance_unused instead of refusing. |
[[layer.step]]id = "paid-first"uses = "standard/leave_balance_first"params = { balance = { fmla = "pto" } }See the cookbook’s protected leave.
leave_blackout
Section titled “leave_blackout”Refuses a leave request with a day in the period blackout.
| Parameter | Default | |
|---|---|---|
blackout | required | A period: ranges, dates, weekdays, or any combination. |
[[layer.step]]id = "blackout"uses = "standard/leave_blackout"params = { blackout = { ranges = [{ from = "2026-10-12", to = "2026-10-16" }] } }See the cookbook’s leave rules.
leave_notice
Section titled “leave_notice”Flags a leave request recorded fewer than days days before its first day,
as leave_short_notice. The request is flagged for the approver, not
refused.
| Parameter | Default |
|---|---|
days | required |
[[layer.step]]id = "notice"uses = "standard/leave_notice"params = { days = 14 }See the cookbook’s leave rules.
leave_route
Section titled “leave_route”Sends a stage of the approval of a leave request to another approver when
the request is of more than over. A route with no over applies to
every request.
| Parameter | Default | |
|---|---|---|
routes | required | Each is { stage, to, over }, with stage and to required. It sends that stage to to for a request of more than over in all. |
[[layer.step]]id = "route"uses = "standard/leave_route"params = { routes = [{ stage = "manager", to = "role:director", over = "24h" }] }See the cookbook’s leave rules.
leave_entitlement
Section titled “leave_entitlement”Refuses a request in categories that takes the protected leave in a period
past weeks of the person’s usual week. The usual week is the duration in
the employment attribute week_attribute, else week. Leave is counted by
the hour. With flag, the request is raised as leave_over_entitlement
instead of refused.
| Parameter | Default | |
|---|---|---|
categories | required | The leave categories counted. |
weeks | 12 | The entitlement, in usual weeks. |
week | 40h | The usual week, for a person whose attribute is not set. |
week_attribute | none | The employment attribute that holds the person’s usual week. |
within | the calendar year | A period. A repeating one (each day’s) is allowed. { next = "12mo" } is 12 months from the first use, and the next 12 from the first use after. { last = "12mo" } is the 12 months up to each day used, and up to each later day the request’s time reaches. |
flag | false | true: raise leave_over_entitlement instead of refusing. |
[[layer.step]]id = "entitlement"uses = "standard/leave_entitlement"params = { categories = ["fmla", "fmla_pto"], week_attribute = "usual_week" }See the cookbook’s protected leave.
leave_eligibility
Section titled “leave_eligibility”Refuses a request in categories in either of two cases. The person has
less than service of employment before its first day. Or the person has
less than hours earned in the accrual category worked, in within
before it. With flag, the request is raised as leave_not_eligible
instead of refused.
| Parameter | Default | |
|---|---|---|
categories | required | The leave categories it applies to. |
worked | required | The accrual category that earns an hour for each hour worked. |
service | 12mo | The length of employment needed. |
service_from | first_hired | first_hired (counts earlier employment) or hired (the current hire). |
hours | 1250h | The hours needed in within. |
within | { last = "12mo" } | A period: where the hours are counted. |
flag | false | true: raise leave_not_eligible instead of refusing. |
[[layer.step]]id = "eligible"uses = "standard/leave_eligibility"params = { categories = ["fmla", "fmla_pto"], worked = "hours_worked" }See the cookbook’s protected leave.
leave_waiting_period
Section titled “leave_waiting_period”Refuses a request in categories with a day in the period wait, counted
from the person’s latest hire. What the leave draws on is earned all the
same during the wait.
| Parameter | Default | |
|---|---|---|
categories | required | The leave categories it applies to. |
wait | { next = "90d" } | A period: the days from the hire that leave is not taken in. |
[[layer.step]]id = "waiting"uses = "standard/leave_waiting_period"params = { categories = ["sick"], wait = { next = "90d" } }See the cookbook’s accrual waiting period.
leave_increment
Section titled “leave_increment”Refuses a request in categories with a day whose time is not a whole
number of increment, naming the day.
| Parameter | Default |
|---|---|
categories, increment | required |
[[layer.step]]id = "sick"uses = "standard/leave_increment"params = { categories = ["sick"], increment = "1h" }"1h" takes sick leave in hour blocks. "8h" takes it in whole days of
eight hours. See the cookbook’s leave
increments and floating
holidays.
leave_days_within
Section titled “leave_days_within”Refuses a request in categories that would bring the days of that leave
in the period within that holds a day of it past days. This request
and the standing ones recorded before it are counted. A day is a day
whatever its hours.
| Parameter | Default | |
|---|---|---|
categories, days | required | The leave categories counted, and the most days. |
within | the calendar year | A period. |
[[layer.step]]id = "ten-days"uses = "standard/leave_days_within"params = { categories = ["jury_duty"], days = 10 }See the cookbook’s jury duty pay.
leave_days_per_request
Section titled “leave_days_per_request”Refuses a request in categories of more days than days gives for the
request’s value value, such as the relationship of a bereavement. A value
not listed gets other days. With no other, a request whose value is not
listed, or that names none, is refused.
| Parameter | Default | |
|---|---|---|
categories, days | required | The leave categories, and the most days for each value: { spouse = 5, parent = 3 }. |
value | relationship | The request value the days are looked up by. |
other | none | The most days for a value not listed. |
[[layer.step]]id = "days"uses = "standard/leave_days_per_request"params = { categories = ["bereavement"], days = { spouse = 5, domestic_partner = 5, child = 5, parent = 3, sibling = 3, grandparent = 3, grandchild = 3 } }The recipe shows a common way to set the days. Check the rules where you operate. See the cookbook’s bereavement leave.
Leave pay
Section titled “Leave pay”These steps price approved leave as pay.
leave_make_up_pay
Section titled “leave_make_up_pay”On each day of approved leave in category, such as jury duty, adds the
day’s scheduled time as money in pay, in the category to. The time is
priced at the rate its context matches, less the money entered that day in
offset, else offset_per_day. A day with no shift uses the leave’s own
time. A day that no rate matches raises kind.
| Parameter | Default | |
|---|---|---|
category, rate, pay, to | required | The leave category, the rate kind, the money measure and the category of the pay. |
offset | none | The measure of money entered for the day (jury pay received) that is taken off. |
offset_per_day | 0 | An amount taken off each day when offset has nothing for it. |
kind | no_rate | The exception raised for a day no rate matches. |
[[layer.step]]id = "make-up"uses = "standard/leave_make_up_pay"params = { category = "jury_duty", rate = "pay", pay = "wages", to = "jury_make_up", offset = "jury_pay" }The recipe shows a common way to make up the difference. Check the rules where you operate. See the cookbook’s jury duty pay.
leave_average_pay
Section titled “leave_average_pay”On each day of approved leave in category, such as annual leave, adds the
leave’s time as money in pay, in the category to. It is paid at the
average hourly pay of the weeks workweeks with pay before its week. It
looks back back weeks at most. The average is the money in includes over
the time counts picks in those weeks. A day with no week of pay before it
raises kind. The step reads the periods before as far back as back
reaches.
| Parameter | Default | |
|---|---|---|
category, pay, to | required | The leave category, the money measure the average is of, and the category of the pay. |
weeks | 52 | How many workweeks with pay are averaged. |
back | 104 | The most weeks looked back for them. |
includes | every category of pay | The categories whose money is averaged. |
counts | every worked category | The categories whose time the money is divided by. |
kind | no_average_pay | The exception raised for a day with no week of pay before it. |
[[layer.step]]id = "holiday-pay"uses = "standard/leave_average_pay"params = { category = "holiday", pay = "wages", to = "holiday_pay" }The recipe shows a common way to pay leave at average earnings. Check the rules where you operate. See the cookbook’s holiday pay at average earnings.
leave_weekly_pay
Section titled “leave_weekly_pay”Pays each day of leave in category, as money in pay, in to. It pays
the day’s time at the greater of two amounts, over the usual week. The
amounts are the ordinary weekly pay and the average weekly earnings. The
ordinary weekly pay is the usual week (the employment attribute
week_attribute where the person has one, else week) at rate. The
average weekly earnings are the money in includes of the weeks
workweeks before, over weeks. A day no rate matches raises kind.
| Parameter | Default | |
|---|---|---|
category, pay, to, rate | required | The leave category, the money measure, the category the pay goes to, and the rate kind. |
week | 40h | The usual week. |
week_attribute | none | The employment attribute that holds a person’s own usual week. |
includes | every category of pay | The categories whose money is averaged. |
weeks | 52 | 1 to 104. |
kind | no_rate |
[[layer.step]]id = "annual-holiday-pay"uses = "standard/leave_weekly_pay"params = { category = "annual_holiday", pay = "wages", to = "annual_holiday_pay", rate = "pay", week_attribute = "ordinary_week" }The recipe shows a common way to pay annual leave at the greater of two weekly amounts. Check the rules where you operate. See the cookbook’s New Zealand Holidays Act.
leave_rostered_penalties
Section titled “leave_rostered_penalties”On each day of approved leave in category, it prices the day’s rostered
shifts at the penalties they would have earned. The category is such as
annual leave, paid at a loading per cent elsewhere. Each instant is priced
at the percent of the first of penalties whose period during holds it,
else 100. Where that comes to more than loading, it adds the leave’s time
at the difference, at the rate its context matches, as money in pay, in
to. A day with no rostered shift is paid the loading alone. A day no rate
matches raises kind.
| Parameter | Default | |
|---|---|---|
category, rate, pay, to | required | The leave category, the rate kind, the money measure and the category of the added pay. |
penalties | required | Each is { during, percent }: a period and the per cent of the rate paid in it. |
loading | 117.5 | The per cent the leave is paid at. |
kind | no_rate | The exception raised for a day no rate matches. |
[[layer.step]]id = "leave-penalties"uses = "standard/leave_rostered_penalties"params = { category = "annual_leave", rate = "pay", pay = "wages", to = "annual_leave_penalties", loading = 117.5, penalties = [{ during = { weekdays = ["sun"] }, percent = 150 }, { during = { weekdays = ["sat"] }, percent = 125 }] }The recipe shows a common way to pay leave at the greater of a loading and the roster’s penalties. Check the rules where you operate. See the cookbook’s Australian retail award.
leave_waiting_days
Section titled “leave_waiting_days”Moves the first days days of leave in categories, in each series of
linked periods of incapacity, to to. A spell is days of that leave with
no work, and no scheduled day that is not of the leave, between them. A
spell of fewer than spell_days calendar days goes to to whole. A spell
that starts within linked_within days of an earlier one’s end is linked
to it, into a series. The series lasts at most longest days from its
first. The spell counts the series’ waiting days. The step reads look_back
days back.
With measure, the step reports each day of a period of incapacity as a
count of 1 in it. Its context is the series’ first day (series) and the
waiting days served by then (served). It then reads back only
linked_within days and a week, and takes a series begun before from
those reports.
| Parameter | Default | |
|---|---|---|
categories, to | required | The leave categories, and the category the waiting days go to. |
days | 3 | The waiting days of a period of incapacity. |
spell_days | 1 | A spell shorter than this goes to to whole. |
linked_within | 56 | Days between spells that link them. |
look_back | 365 | Days of earlier leave read, without measure. |
longest | 1095 | The most days a series of linked periods lasts from its first. A period starting after that begins a new series. |
measure | none | The count measure each day of a period of incapacity is reported in, with its series. |
[[layer.step]]id = "waiting"uses = "standard/leave_waiting_days"params = { categories = ["sick"], to = "sick_waiting", days = 3, spell_days = 4, linked_within = 56 }The recipe shows a common way to set waiting days for statutory sick pay. Check the rules where you operate. See the cookbook’s UK statutory sick pay.
Punches
Section titled “Punches”lockout
Section titled “lockout”Ignores a duplicate punch, such as a badge swiped twice. A duplicate is a
punch within within of the punch before it, of the same kind (or where
either has no direction).
| Parameter | Default |
|---|---|
within | 2m |
Treats an out followed within within by an in as no gap. An example is
stepping out for a moment. Both punches are ignored and the work runs on
as one segment. Only an out and an in of the same workday are joined. The
in is the next punch of that workday that is not ignored.
| Parameter | Default |
|---|---|
within | 5m |
[[layer.step]]id = "lockout"uses = "standard/lockout"params = { within = "2m" }
[[layer.step]]id = "join"uses = "standard/join"params = { within = "5m" }See the cookbook’s double punch lockout.
gap_lunch
Section titled “gap_lunch”Takes a plain out followed within within by an
in as a lunch (as = "break": a break). The out is the lunch’s start and the
in its end. So the gap is a lunch segment and the work around it is one
shift. The break rules count it as a break. A rule on rest between shifts
does not take the work after it for a new shift. Pay is as the gap was (a
lunch is not worked).
It takes every plain out and in, whatever the clock. A punch keyed as lunch
at a clock with lunch keys is a lunch already. A business that wants short
outs to stay outs does not list the step. A pair of the same workday, or the
last out of a day and the first in of the next, are one gap. Run it after
direction (it needs known ins and outs) and before join.
| Parameter | Default |
|---|---|
within | required |
as | lunch |
[[layer.step]]id = "gap-lunch"uses = "standard/gap_lunch"params = { within = "90m" }See the cookbook’s a lunch from an out and an in.
direction
Section titled “direction”Gives a direction to punches that have none, such as those from a clock with no in and out keys. Some steps ask whether a punch is an in or an out. They pass over a punch of unknown direction. Those steps are grace, and round where its punches name in or out. So a policy for such a clock runs this step first.
| Parameter | Default | |
|---|---|---|
mode | gap | "gap": a punch more than gap after the one before (or with none before) is an in. The rest alternate from that known start each shift. "schedule": a punch nearer a scheduled shift’s start than its end is an in, else an out. The shift is one of the punch’s workday or the next. |
gap | 6h | For "gap". |
[[layer.step]]id = "direction"uses = "standard/direction"params = { mode = "schedule" }See the cookbook’s unknown punch direction.
longest_shift
Section titled “longest_shift”Raises shift_too_long for work started by an in punch whose next punch
comes more than longest after it. That is a forgotten clock-out, found
when the person next punches. With close, the work ends at the limit
instead (an automatic clock-out). So its time counts and the next punch
starts afresh. Work with no punch after it yet may still be going on. So the
step says nothing about it.
| Parameter | Default |
|---|---|
longest | 16h |
close | false |
[[layer.step]]id = "longest-shift"uses = "standard/longest_shift"params = { longest = "14h", close = true }See the cookbook’s forgotten clock-out. The longest shift also decides who is in now.
device_allowed
Section titled “device_allowed”Raises kind about a punch made on a device
the person’s employment attribute attribute does not list. The
attribute is a list, or text separated by commas ("web, CG1"). A person
without the attribute may punch on any device. The punch counts all the
same.
| Parameter | Default |
|---|---|
attribute | devices |
kind | device_not_allowed |
[[layer.step]]id = "devices"uses = "standard/device_allowed"params = { attribute = "devices", kind = "device_not_allowed" }See the cookbook’s punching only on the devices a person is set up for. Check what the law where you operate says about tracking where people punch from.
Shifts and time
Section titled “Shifts and time”This step decides which scheduled shift a piece of work belongs to. Work belongs to a shift if it starts between early before the shift’s start and late after it. Lunch and breaks go with the shift they fall in.
| Parameter | Default | |
|---|---|---|
early | 0s | How early. |
late | the shift’s end | How late. |
prefer | first | If several shifts fit: "first" is the one that starts earliest. "nearest" is the one whose start is nearest the work’s start. |
[[layer.step]]id = "match"uses = "standard/match"params = { early = "30m", late = "2h", prefer = "nearest" }See the cookbook’s shift matching.
assign
Section titled “assign”This step decides which assignment gets work that several of the person’s assignments fit, when nothing says which. Work here means a segment, a labor entry or a day of leave. The work goes to the first of prefer that fits. Or it goes to the assignment that the person’s employment attribute attribute names, such as a primary assignment. When the step chooses none, the work is assignment_ambiguous. It is the same without the step.
| Parameter | Default | |
|---|---|---|
prefer | none | Assignments, in order. |
attribute | none | The employment attribute naming the assignment. |
[[layer.step]]id = "assign"uses = "standard/assign"params = { attribute = "primary_assignment" }See the cookbook’s primary assignment.
attribute
Section titled “attribute”This step decides which workday a segment belongs to when the segment crosses a workday’s start. It decides as the law you follow says. Without this step, every segment belongs to the workday it starts in. See overnight shifts. A layer in force from a day attributes only the segments starting on the days it applies on.
| Parameter | Default | |
|---|---|---|
mode | start | "start": the whole segment goes to the workday it starts in. "end": the whole segment goes to the workday it ends in. "split": the segment is cut at each workday’s start. Each piece goes to its own workday. A daily overtime law that counts by a fixed 24-hour workday does the same. |
why | none | What the stamp says: "hours count in the workday they are worked in". |
[[layer.step]]id = "overnight"uses = "standard/attribute"params = { mode = "split", why = "hours count in the workday they are worked in" }For example, a person punches in at 20:07 on Monday and out at 06:08 on Tuesday. The day starts at midnight. Rounding is 15 minutes. The daily threshold is 8 hours. The shift is 20:00 to 24:00 on Monday and 00:00 to 06:15 on Tuesday. Rounding moves the punches, never the cut. Each day’s threshold counts its own piece. See the cookbook’s overnight shifts.
This step rounds punches of the kinds in punches. It rounds to the nearest interval, or as mode says. The grid of wall times starts at the workday’s start. For example, with the day starting at 04:00, 15 minutes rounds to 04:00, 04:15 and so on.
Where a segment was split at a workday’s start there is no punch, and that edge stays.
A rounded time is not used in two cases. One is when it would put a segment’s end before its start. The other is when it would make a segment’s edge meet or cross the segment next to it. Then the segment stays as punched. So does the neighbour it would meet. Each gets an edge_not_placed exception.
The segment next to it is the one next in time. That holds whatever workday, week or pay period it is of. For example, a shift worked over the last night of a pay period is placed against the first segment of the next one. A punch arriving in the next period can put the shift back as punched. That happens in the first period’s ledger, where the exception is.
When an in or an out that ends a lunch or break is rounded, the lunch or break ends at the rounded time too. The work an in starts begins there.
A stretch with no end, such as work after an in with no out, counts as a neighbour from its start. No later segment is taken to before it starts, or into the segment before it.
The raw punch times are kept, and each change is stamped.
| Parameter | Default | |
|---|---|---|
interval | required | The step to round to: "15m". |
mode | nearest | "nearest", "up", "down", or a duration. With "7m", a time up to 7 minutes past a step rounds down. A later time rounds up. |
punches | every kind | The punch kinds rounded, from in, out and unknown: ["in", "out"]. |
snap_to_shift | none | { before = "7m", after = "7m" }. Both are required. A punch that close to its shift’s start or end is taken at that start or end. It is not rounded. |
[[layer.step]]id = "rounding"uses = "standard/round"params = { interval = "15m", punches = ["in", "out"] }For example, a person punches in at 07:53, has lunch from 12:02 to 12:31, and punches out at 16:22. The work is 08:00-12:02 and 12:31-16:15. The lunch punches stay as punched. The total is 7.76 hours.
Take snap_to_shift = { before = "10m", after = "15m" } and a shift from 08:00 to 16:30. Punches at 07:52 and 16:41 are taken as 08:00 and 16:30. See the
cookbook’s seven-minute rounding.
This step takes an in punch as the shift’s start when it falls between in_early before and in_late after the start. It takes an out punch as the shift’s end when it falls between out_early before and out_late after the end.
It applies only to work matched to a shift. An in before the start is matched where shifts.early or a match step allows it.
The step does not use an edge it would carry past the segment’s other edge or a neighbour’s. Then the segment stays as punched. So does that neighbour. Each gets an edge_not_placed exception.
| Parameter | Default |
|---|---|
in_early, in_late, out_early, out_late | 0s each: off |
[[layer.step]]id = "grace"uses = "standard/grace"params = { in_late = "5m", out_early = "5m" }With in_late = "5m", an in at 08:05 is taken at the 08:00 start. An in at 08:06 stays. With out_early = "5m", an out at 15:55 is taken at the 16:00 end. An out at 15:54 stays. See the cookbook’s snap to
schedule.
rate_tie
Section titled “rate_tie”This step decides which rate applies when two rates of a kind match the work’s context equally well. For example, one rate names its job and another names its location. When the step chooses none, the tie is rate_ambiguous and no rate applies.
A rate chosen carries the stamp of the choice. The stamp names the step, its layers and why. For example: chose rate 2 of 3 that tie: 1800 USD: the rate naming the job. The stamp is on the rate the ledger keeps. It is also on the lines and counts the rate priced.
A rate is chosen among the rates of one amount and currency. So two rates that tie in two currencies are told apart.
| Parameter | Default | |
|---|---|---|
prefer | none | Dimensions, in order: ["job", "location"]. The rate naming the first of them that one does wins. |
pick | none | Then "highest" or "lowest" amount. Of equal amounts, the first. |
[[layer.step]]id = "rates"uses = "standard/rate_tie"params = { pick = "highest" }See the cookbook’s highest rate wins.
rate_by_hours
Section titled “rate_by_hours”This step chooses among rates of kind that tie. Each is a rung’s rate for the same context. The step chooses the rate of the rung that the person’s hours to date reached.
The lowest rate is for the first rung. The next higher rate is for each of rungs reached. The highest rate is for past the last rung.
The hours to date are the balance of the accrual category balance as the pay period starts. The balance is kept on the pay side. The bill side reads it too. A rung reached during a period is paid from the next period.
An accrue step that earns an hour for each hour counted keeps the balance. A hand adjustment credits hours from before.
| Parameter | Default | |
|---|---|---|
balance | required | The accrual category that holds the hours to date. |
rungs | required | The hours each rung after the first starts at: ["1000h", "2000h", "3000h"]. |
kind | pay | The rate kind chosen among. |
[[layer.step]]id = "rung"uses = "standard/rate_by_hours"params = { balance = "electrician_apprentice_hours", rungs = ["1000h", "2000h", "3000h"] }See the cookbook’s pay rate by hours worked.
Overtime and premiums
Section titled “Overtime and premiums”threshold
Section titled “threshold”This step moves time counted in the window over over to the category to. It moves the latest time first. It splits the line at the exact instant the threshold is crossed. With tiers, the highest tier moves first. Each lower tier counts what the higher one left.
| Parameter | Default | |
|---|---|---|
over, to | The amount, and the category the time over it goes to. Required unless tiers is given. Not allowed with tiers. | |
tiers | Each is { over, to }. They are several thresholds of one count, in any order. | |
window | day | day, week, period, or 24h. 24h is 24 hours from when work starts. |
counts | every worked category | The categories counted, and moved from. |
others | none | true: the worker’s other records (workers) count toward it too. A list of employers: only theirs. Other records count their time in the categories the step counts. These are every worked category, or those counts names. So leave or holiday pay at the other employer is not hours worked. Only this record’s time moves, never more than its own. |
[[layer.step]]id = "daily"uses = "standard/threshold"params = { window = "day", counts = ["work"], tiers = [{ over = "8h", to = "overtime" }, { over = "12h", to = "double_time" }] }
[[layer.step]]id = "weekly"uses = "standard/threshold"params = { over = "40h", to = "overtime", window = "week", counts = ["work"] }For example, take five nine-hour days with only the weekly threshold. Friday is split at 12:00. Its last five hours are overtime. They are stamped weekly [...]: moved 5h from work to overtime: over 40h in the week. With the tiers, exactly 8 hours in a day is all regular. 13 hours is 8 regular, 4 overtime and the day’s last hour double time. Tiers count exact time, not wall-clock time. On the day the clocks go back, midnight to 13:00 is 14 hours worked.
To use daily and weekly thresholds together, give the weekly one counts = ["work"]. Then time the daily one already moved to overtime is not counted again. A week starting in the pay period before counts that period’s lines. It moves only this period’s.
With others = true, 24 hours here and 30 at two other employers are 54. So 14 of this record’s hours are overtime. See the cookbook’s weekly
overtime, California
overtime and joint
employment overtime.
one_longer_day
Section titled “one_longer_day”This step moves each day’s time counted past over to to. It moves the latest time first. On the window’s first day with time counted past over, it moves only what is past longer. That day is the window’s one longer day. The days of the window before the pay period count toward which day that is. They are not moved.
| Parameter | Default | |
|---|---|---|
over, longer, to | required | The daily limit, the limit of the one longer day, and where the time past a limit goes. |
counts | every worked category but to | |
window | week |
[[layer.step]]id = "daily"uses = "standard/one_longer_day"params = { over = "9h", longer = "11h", to = "overtime", counts = ["work"] }The recipe shows a common way to allow one longer day a week. Check the rules where you operate. See the cookbook’s Australian retail award.
consecutive_day
Section titled “consecutive_day”This step moves the counted time of the day-th consecutive day worked in the window, and of every day after it. The time goes to to, or by tiers past each tier’s over. A run starts again with each window. Days of the run in the pay period before are counted, never moved.
| Parameter | Default | |
|---|---|---|
day | 7 | Which day of the run, and every one after it. |
to or tiers | Where the day’s time goes, or tiers of it. One of them is required. | |
counts | every worked category | The categories counted. A day whose time is all in other categories breaks the run. |
window | week | period lets a run cross the week’s start. |
[[layer.step]]id = "seventh"uses = "standard/consecutive_day"params = { day = 7, counts = ["work", "overtime"], tiers = [{ over = "0s", to = "overtime" }, { over = "8h", to = "double_time" }] }Take seven 8-hour days, Monday to Sunday. Sunday’s 8 hours are overtime. With the tiers, suppose a daily threshold made Sunday’s last 2 of 10 hours overtime. Then Sunday is 8 hours of overtime and 2 of double time. See the cookbook’s California overtime.
after_schedule
Section titled “after_schedule”This step moves worked time past the day’s scheduled time to to. A day with no
shift is all regular or all overtime, as unscheduled says.
| Parameter | Default |
|---|---|
to | overtime |
unscheduled | regular |
counts | every worked category |
[[layer.step]]id = "after-schedule"uses = "standard/after_schedule"params = { unscheduled = "overtime" }For a shift scheduled 08:00 to 16:00, Monday’s hour past the 8 scheduled is overtime. Tuesday’s 8 are not. With unscheduled = "overtime", Saturday’s 4 hours with no shift are all overtime. See the cookbook’s overtime after
schedule.
unscheduled_day
Section titled “unscheduled_day”This step moves the counted time of a workday with no scheduled shift to to. Or it moves the time by tiers past each tier’s over.
| Parameter | Default | |
|---|---|---|
to or tiers | Where the day’s time goes, or tiers of it. One of them is required. | |
counts | every worked category except the tiers’ own | The categories counted. |
[[layer.step]]id = "extra-day"uses = "standard/unscheduled_day"params = { tiers = [{ over = "0s", to = "overtime" }, { over = "8h", to = "double_time" }] }See the cookbook’s alternative workweek.
window_premium
Section titled “window_premium”This step moves time counted inside a period to category. It cuts the time at the instants the period starts and finishes. Untimed lines, such as hours from labor entries, are never moved.
| Parameter | Default | |
|---|---|---|
during | required | The period: each day’s hours, the weekend’s nights, or any other period. The value { daily = { from = "22:00", to = "06:00" } } runs past midnight. |
category | required | Where the time goes. |
counts | every worked category |
[[layer.step]]id = "night"uses = "standard/window_premium"params = { during = { daily = { from = "22:00", to = "06:00" } }, category = "night" }A shift from 20:00 to 04:00 is 20:00-22:00 work 2.00 and
22:00-04:00 night 6.00. All of it is on the workday it started. At a site in another zone, the wall times are the site’s. See the cookbook’s local time at each
site and night differential.
window_premium_run_on
Section titled “window_premium_run_on”This step does what window_premium does. It also moves time to category in one more case. The case is a stretch of work that held the whole of a stretch of during and went on past it. The time moved is the time counted from where during ends to where the work does.
A night worked whole and worked on past its end is night to the end of the work. Work that starts inside the period, or ends with it, runs nothing on.
| Parameter | Default | |
|---|---|---|
during | required | The period. |
category | required | Where the time goes. |
counts | every worked category |
[[layer.step]]id = "night"uses = "standard/window_premium_run_on"params = { during = { daily = { from = "22:00", to = "05:00" } }, counts = ["work"], category = "night" }Work of one workday is joined where one stretch ends as the next starts. The recipe shows a common way to count work that runs on past the night. Check the rules where you operate. See the cookbook’s Brazil working hours.
premium
Section titled “premium”This step moves a day’s counted time to category where every condition given holds. The conditions are:
- The day is one of the
weekdayslisted. - The day observes a holiday.
holidaysistrue, or a list of holiday ids. - The work’s context has the
contextvalues.
At least one condition is required. For time that meets either of two conditions, list two steps.
| Parameter | Default |
|---|---|
category | required |
weekdays, holidays, context | one at least |
counts | every worked category |
[[layer.step]]id = "weekend"uses = "standard/premium"params = { weekdays = ["saturday", "sunday"], category = "weekend", counts = ["work"] }With counts = ["work"], Saturday’s 8 regular hours go to the weekend category. Its 2 hours of overtime stay overtime. Without it, all 10 hours move. See the cookbook’s weekend premium
and holiday worked premium.
auto_meal
Section titled “auto_meal”This step deducts meal to to from a day worked past after with no meal taken. It deducts as if the meal was taken at into the day’s work. A punched gap of at least meal counts as the meal. So does time in meal_category.
| Parameter | Default |
|---|---|
after | 6h |
meal | 30m |
at | 5h |
to | meal_deducted |
meal_category | meal |
[[layer.step]]id = "meal"uses = "standard/auto_meal"params = { after = "6h", meal = "30m", at = "5h" }A day worked past 6 hours with no meal has 30 minutes moved to meal_deducted once 5 hours of work have passed. A day of exactly 6 hours keeps its time. On the night the clocks go back, the 5 hours are of work, not of wall-clock time. See the cookbook’s automatic meal
deduction.
meal_premium
Section titled “meal_premium”This step pays premium in category on a day worked past required_after. It pays when more than by was worked before the first meal started.
| Parameter | Default |
|---|---|
by | 5h |
required_after | by |
premium | 1h |
category | meal_premium |
meal | 30m: the punched gap that is a meal |
meal_category | meal |
[[layer.step]]id = "meal-premium"uses = "standard/meal_premium"params = { by = "5h", premium = "1h" }A punched 30-minute lunch starting at the end of the fifth hour pays no premium. One starting a minute later pays an hour of meal_premium. Exactly 5 hours with no meal need none. 6 hours with no meal pay an hour. See the cookbook’s meal period
premium.
second_meal_premium
Section titled “second_meal_premium”This step pays premium in category on a day worked past required_after. It pays when more than by was worked before its second meal. A day that has time in category already pays no second premium. That is one meal premium a day. A waiver kept in the employment attribute waiver holds on a day of no more than waived_up_to whose first meal was taken.
| Parameter | Default |
|---|---|
by | 10h |
required_after | by |
premium | 1h |
category | meal_premium |
meal | 30m: the punched gap that is a meal |
meal_category | meal |
waiver | none: the employment attribute that holds the waiver |
waived_up_to | 12h |
[[layer.step]]id = "second_meal"uses = "standard/second_meal_premium"params = { by = "10h" }The recipe shows a common way to pay a second meal premium. Check the rules where you operate. See the cookbook’s meal period premium.
rest_break_premium
Section titled “rest_break_premium”This step pays premium once in category on a day with fewer breaks than due. A break is a stretch in breaks. No break is due below from worked. After that, one is due for each every of work, or the greater part of it.
| Parameter | Default |
|---|---|
every | 4h |
from | 3h30m |
breaks | rest_break: the break category looked at |
premium | 1h |
category | rest_premium |
[[layer.step]]id = "rest_premium"uses = "standard/rest_break_premium"params = { every = "4h", from = "3h30m" }The recipe shows a common way to pay a rest break premium. Check the rules where you operate. See the cookbook’s rest period premium.
minimum_pay
Section titled “minimum_pay”This step tops work up to at_least in category. What it tops up depends on its basis:
reporting: A scheduled day reported for and worked short is paid at leastat_least, or half the shift withhalf_of_shift, up toat_most.call_back: Each stretch of work outside the shifts is paid at leastat_least.stretch: Each stretch of the time thatcountsandcontextpick is paid at leastat_least. A call-out on call is an example.
| Parameter | Default | |
|---|---|---|
basis | required | reporting, call_back or stretch. |
at_least | required | |
half_of_shift | false | reporting only. |
at_most | none | reporting only. |
category | minimum_pay | |
counts | every worked category | |
context | none | Only work of these values. |
[[layer.step]]id = "reporting"uses = "standard/minimum_pay"params = { basis = "reporting", half_of_shift = true, at_least = "2h", at_most = "4h", category = "reporting_pay" }A 10-hour shift where the person is sent home after an hour pays 4 hours, not the 5 that half of it would. With basis = "call_back" and at_least = "2h", a 1-hour call-back outside the shift is topped up an hour. Staying late runs on from the shift and is no call-back. See the cookbook’s reporting time
pay, call-back
pay and
on call.
split_shift
Section titled “split_shift”This step pays pay once in category on a day whose work is split by a gap
longer than gap. The gap is measured in elapsed time, not wall-clock
time.
| Parameter | Default |
|---|---|
gap | 1h |
pay | 1h |
category | split_shift |
[[layer.step]]id = "split-shift"uses = "standard/split_shift"params = { gap = "1h", pay = "1h" }Two stretches exactly an hour apart pay nothing. Two stretches an hour and a minute apart pay an hour of split_shift. Three stretches with two long gaps pay once.
See the cookbook’s split shift premium.
minimum_engagement
Section titled “minimum_engagement”This step tops each engagement of the day up to at_least of time counted, in category. An engagement is the day’s timed time joined across gaps of up to gap. So an unpaid meal break inside it keeps it one engagement.
| Parameter | Default |
|---|---|
at_least | required |
gap | 1h |
category | minimum_engagement |
counts | every worked category |
[[layer.step]]id = "minimum-engagement"uses = "standard/minimum_engagement"params = { at_least = "3h" }With at_least = "3h", an engagement of 2 hours is topped up by an hour.
The recipe shows a common way to give casual and part-time employees a
minimum engagement. Check the rules where you operate. See the cookbook’s
Australian retail award.
split_shift_pay
Section titled “split_shift_pay”On a day split by a gap longer than gap, this step adds money. The amount is one hour at the day’s highest minimum rate. It is added on top of the minimum for the day’s hours. It is less what those hours are paid at rate above that minimum.
| Parameter | Default |
|---|---|
gap | 1h |
rate, minimum, pay, category | required |
counts | every worked category |
[[layer.step]]id = "split_shift"uses = "standard/split_shift_pay"params = { gap = "1h", rate = "pay", minimum = "minimum", pay = "wages", category = "split_shift" }The recipe shows a common way to pay a split shift premium as money. Check the rules where you operate. See the cookbook’s California split shift.
split_shift_allowance
Section titled “split_shift_allowance”This step pays amount once, as money in pay, in category. It pays on a day whose time is split by a gap longer than gap. The gap is measured in elapsed time,
not wall-clock time.
| Parameter | Default | |
|---|---|---|
gap | 1h | |
amount | required | Whole minor units: 480 is 4.80. |
pay | required | The money measure the amount is added to. |
category | required |
[[layer.step]]id = "broken-shift"uses = "standard/split_shift_allowance"params = { amount = 480, pay = "wages", category = "broken_shift" }The recipe shows a common way to pay a broken shift allowance. Check the rules where you operate. See the cookbook’s Australian retail award.
spread_of_hours
Section titled “spread_of_hours”This step moves to to the day’s counted time that is worked more than spread after the day’s first work started.
| Parameter | Default |
|---|---|
spread, to | required |
counts | every worked category |
[[layer.step]]id = "spread"uses = "standard/spread_of_hours"params = { spread = "12h", to = "double_time", counts = ["work"] }With spread = "12h", work from 06:00 to 20:00 moves the 2 hours after
18:00 to double_time. The recipe shows a common way to pay a spread of
hours. Check the rules where you operate. See the cookbook’s Australian
retail award.
shortened_hour
Section titled “shortened_hour”This step adds time in category, for thresholds that count category. It works on the day’s time counted inside the period during. It adds what that time comes to in hours of hour, beyond its own length. Seven hours of night in hours of 52 minutes 30 seconds are 8 hours. So an hour is added.
| Parameter | Default | |
|---|---|---|
during | required | A period: the hours that count in the shortened hour. |
hour | required | The length of an hour inside it. More than nothing and less than 1h. |
category | required | Where the added time goes. |
counts | every worked category |
[[layer.step]]id = "night-hour"uses = "standard/shortened_hour"params = { during = { daily = { from = "22:00", to = "05:00" } }, hour = "52m30s", category = "night_hour", counts = ["work"] }A threshold step that counts category as well as work
reaches its limit sooner. The recipe shows a common way to count a night
hour. Check the rules where you operate. See the cookbook’s Brazil
working hours.
shortened_hour_run_on
Section titled “shortened_hour_run_on”This step does what shortened_hour does over during. It also does it over the time a stretch of work went on past during, when that stretch of work held the whole of a stretch of during.
| Parameter | Default | |
|---|---|---|
during | required | The period: the hours that count in the shortened hour. |
hour | required | The length of an hour inside it. More than nothing and less than 1h. |
category | required | Where the added time goes. |
counts | every worked category |
[[layer.step]]id = "night-hour"uses = "standard/shortened_hour_run_on"params = { during = { daily = { from = "22:00", to = "05:00" } }, hour = "52m30s", category = "night_hour", counts = ["work"] }See the cookbook’s Brazil working hours.
short_rest
Section titled “short_rest”This step moves to to the day’s counted time that is within at_least of the end of the last work of an earlier workday. The earlier workday may be in the period before.
| Parameter | Default |
|---|---|
at_least | 10h |
to | required |
counts | every worked category |
[[layer.step]]id = "rest"uses = "standard/short_rest"params = { at_least = "10h", to = "short_rest" }The recipe shows a common way to set a premium for a short rest between shifts. Check the rules where you operate. See the cookbook’s predictive scheduling.
short_rest_pay
Section titled “short_rest_pay”This step pays amount once, as money, for a day whose first work started within at_least of the end of the last work.
| Parameter | Default |
|---|---|
at_least | 10h |
amount, pay, category | required |
counts | every worked category |
[[layer.step]]id = "rest-pay"uses = "standard/short_rest_pay"params = { at_least = "10h", amount = 10000, pay = "wages", category = "clopening" }The recipe shows a common way to pay a flat amount for each short rest. Check the rules where you operate. See the cookbook’s predictive scheduling.
schedule_change_pay
Section titled “schedule_change_pay”This step pays a day whose shifts changed after its notice began. The notice begins notice_days before the day’s date. The pay is in category. It is reduced per cent of the time taken away. Or it is changed for time added or a shift moved.
It pays nothing where every change since was the employee’s. Such a change is an override whose reason is one of employee_reasons.
| Parameter | Default |
|---|---|
notice_days | 14 |
changed | 1h |
reduced | 50 |
category | predictability_pay |
employee_reasons | ["employee_request"] |
[[layer.step]]id = "changes"uses = "standard/schedule_change_pay"params = { notice_days = 14, changed = "1h", reduced = 50 }The recipe shows a common way to pay for schedule changes. Check the rules where you operate. See the cookbook’s predictive scheduling.
long_break
Section titled “long_break”This step moves each break longer than longest whole to to. Or it raises kind about it. Or it does both. One of to and kind is required.
| Parameter | Default |
|---|---|
longest | 20m |
breaks | rest_break: the break category looked at |
to, kind | one at least |
[[layer.step]]id = "long-break"uses = "standard/long_break"params = { longest = "20m", kind = "long_break" }A break of exactly 20 minutes is a rest break. One of 21 minutes is long. It is raised about its line. With to = "unpaid_break", it moves there whole instead. See the cookbook’s paid rest breaks.
holiday_pay
Section titled “holiday_pay”This step pays time in category once on a day that observes one of the holidays it pays. See schedules. A day before the person’s first hire or after their termination is not paid.
The category must be set up as not worked. Given a worked category, the step stops with an error. A holiday can’t be paid as worked time.
| Parameter | Default | |
|---|---|---|
time | required | "8h", or "scheduled", which is the time of the day’s shifts. |
category | required | Where the pay goes; must not be worked. |
holidays | every holiday | The holiday ids it pays. |
context | the day’s first shift’s values | The pay’s labor context. |
scheduled_only | false | true: only on a day with a shift. |
after_days | none | Only for someone employed at least that many days. |
[[layer.step]]id = "holiday-pay"uses = "standard/holiday_pay"params = { time = "8h", category = "holiday", after_days = 90 }With after_days = 90, someone hired July 14 is paid Columbus Day, which is day 90. Someone hired July 15 is not, since it is day 89. See the cookbook’s
holiday pay after a waiting
period and
holiday pay if scheduled.
holiday_attendance
Section titled “holiday_attendance”This step moves a holiday’s pay to to. The pay is the lines in category. The step moves it when either of two days was not worked, not taken off and not on approved leave. The two days are the last scheduled workday before the holiday, and the first one after it within within days.
A day before the holiday that falls in the period before is read there. Pay whose day after falls in a later period goes to held. That period decides it on that day. It is paid in category, or moved to to.
| Parameter | Default | |
|---|---|---|
category, to | required | The category of the holiday pay, and where it goes when the rule is not met. |
held | holiday_held | Where pay waits for a day in a later period. |
within | 7 | How many days either side are searched for the scheduled day (1 to 7). |
window | period |
[[layer.step]]id = "attendance"uses = "standard/holiday_attendance"params = { category = "holiday", to = "holiday_forfeited" }The recipe shows a common way to pay a holiday only when the days around it were worked. Check the rules where you operate. See the cookbook’s holiday pay if worked around.
holiday_pay_if_present_before
Section titled “holiday_pay_if_present_before”This step moves a holiday’s pay to to. The pay is the lines in category. The step moves it when the person neither worked the holiday nor was present, or on paid leave, on the workday before it.
That day is the last one before the holiday, within within days, with a shift. A holiday not worked is passed over. A holiday worked counts as present. Time in a paid category counts as present or on paid leave. The step reads the 14 days before.
| Parameter | Default | |
|---|---|---|
category, to | required | The category of the holiday pay, and where it goes when the rule is not met. |
within | 7 | How many days before the holiday the workday is searched for (1 to 7). |
window | period |
[[layer.step]]id = "regular-holiday-eligibility"uses = "standard/holiday_pay_if_present_before"params = { category = "regular_holiday_pay", to = "regular_holiday_pay_forfeited" }to should be set up as not paid. The recipe shows a common way to pay a
holiday only after presence the day before. Check the rules where you
operate. See the cookbook’s Philippines premium
pay.
holiday_pay_from_earnings
Section titled “holiday_pay_from_earnings”On a holiday the day observes, this step adds money in pay, in category. holidays is true or the ids. The money added is the money in includes of the weeks workweeks before its week, divided by divide_by. divide_by is a number of days, such as 20. Or it is days_worked, the days in those weeks with time counted. A day before the person’s first hire or after their termination is not paid.
| Parameter | Default | |
|---|---|---|
pay, category | required | The money measure and the category the pay goes to. |
includes | required | The categories whose money is averaged. It must not be category. |
weeks | 4 | 1 to 52. |
divide_by | 20 | A whole number of 1 or more, or days_worked. |
holidays | true | true for every holiday, or the holiday ids. |
counts | every worked category | The time that makes a day worked, for days_worked. |
[[layer.step]]id = "public-holiday-pay"uses = "standard/holiday_pay_from_earnings"params = { pay = "wages", category = "public_holiday_pay", includes = ["work", "vacation_pay"] }With divide_by = 20, 4 weeks that earned 2,000.00 pay a holiday 100.00.
The recipe shows a common way to pay a public holiday from earnings. Check the rules where you operate. See the cookbook’s Canada employment
standards.
holiday_pay_otherwise_working
Section titled “holiday_pay_otherwise_working”This step works on a holiday the day observes (holidays) that is not worked and is an otherwise working day. It adds in category the time the person would have worked.
A day is an otherwise working day in either of two cases. A shift is scheduled on it. Or its weekday was worked in at least at_least of the weeks weeks before.
The time added is the shifts’ time. If there are none, it is the average of those weekdays worked. A day before the person’s first hire or after their termination is not paid.
The category must be set up as not worked. A worked one stops the step with an error on the first holiday it pays. The time is not worked. The overtime rules count worked categories, unless their counts names others. So they leave this time out of the week’s hours. It counts toward overtime only where a rule’s counts lists category.
| Parameter | Default | |
|---|---|---|
category | required | Where the pay goes; must not be worked. |
holidays | true | true for every holiday, or the holiday ids. |
weeks | 13 | 1 to 52. |
at_least | 7 | 1 to weeks: the weeks the weekday was worked in. |
counts | every worked category | The time that makes a day worked. |
[[layer.step]]id = "public-holiday-not-worked"uses = "standard/holiday_pay_otherwise_working"params = { category = "public_holiday_pay" }The recipe shows a common way to pay a public holiday not worked. Check the rules where you operate. See the cookbook’s New Zealand Holidays Act.
holiday_average_daily_pay
Section titled “holiday_average_daily_pay”On a holiday not worked that is an otherwise working day, this step adds money in pay, in category. holiday_pay_otherwise_working decides what an otherwise working day is. The money added is the money in includes of the paid_weeks workweeks before its week, divided by the number of days in them with time in days.
| Parameter | Default | |
|---|---|---|
pay, category | required | The money measure and the category the pay goes to. |
includes | every category of pay | The categories whose money is averaged. |
days | every paid category | The categories whose time makes a day count in the divisor. |
paid_weeks | 52 | 1 to 104. |
holidays | true | true for every holiday, or the holiday ids. |
weeks | 13 | 1 to 52: the weeks that decide an otherwise working day. |
at_least | 7 | 1 to weeks. |
counts | every worked category | The time that makes a day worked. |
[[layer.step]]id = "public-holiday-average-daily-pay"uses = "standard/holiday_average_daily_pay"params = { pay = "wages", category = "public_holiday_pay" }The recipe shows a common way to pay a holiday at average daily pay. Check the rules where you operate. See the cookbook’s New Zealand Holidays Act.
alternative_holiday
Section titled “alternative_holiday”On a holiday the day observes that is worked and is an otherwise working day, this step adds day in category. holiday_pay_otherwise_working decides what an otherwise working day is. An accrue step banks it as a day off in lieu.
| Parameter | Default | |
|---|---|---|
category | required | Where the day goes. |
day | 8h | The length of the day added. |
holidays | true | true for every holiday, or the holiday ids. |
weeks | 13 | 1 to 52. |
at_least | 7 | 1 to weeks. |
counts | every worked category | The time that makes a day worked. |
[[layer.step]]id = "alternative-holiday"uses = "standard/alternative_holiday"params = { category = "alternative_holiday_earned" }The recipe shows a common way to give a day off in lieu for a holiday worked. Check the rules where you operate. See the cookbook’s New Zealand Holidays Act.
This step raises kind for more than over counted in the window, about its latest line or the day. Instead of over, over_from names a dotted path in the tenant’s metadata. That path holds the amount. A tenant without it has no limit.
| Parameter | Default |
|---|---|
over or over_from | one of them |
kind | required |
about | line (or day) |
counts | every worked category |
window | day |
[[layer.step]]id = "long-day"uses = "standard/limit"params = { over = "10h", kind = "long_day" }Exactly 10 hours raise nothing. 10 hours and a minute raise long_day about the day’s latest line. See the cookbook’s long day
review and minor
hours.
work_during
Section titled “work_during”This step raises kind about the latest line of each workday that has time inside
the period during, such as a minor’s evenings and early mornings.
| Parameter | Default | |
|---|---|---|
during | required | A period: { daily = { from = "19:00", to = "07:00" } }. |
kind | required | |
counts | every worked category |
[[layer.step]]id = "minor-night"uses = "standard/work_during"params = { during = { daily = { from = "19:00", to = "07:00" } }, kind = "minor_late_work" }The recipe shows a common way to flag a minor’s hours. Check the rules where you operate. See the cookbook’s minor hours.
Working-time limits
Section titled “Working-time limits”These steps raise an exception when working time passes a limit. They change no pay. The recipes show common ways to set the limits of a jurisdiction. Check the rules where you operate.
average_limit
Section titled “average_limit”For each workweek ending in the window, this step raises kind about its latest line. It does so when the time counted in the weeks workweeks with any ending with it averages more than over a week.
A week with no time counted is passed over, not counted as nothing. A fixed reference period is a limit on a repeating window of its length. The step reads the periods before as far back as weeks reaches.
| Parameter | Default |
|---|---|
over, weeks, kind | required |
counts | every worked category |
others | none |
window | period |
With others, the worker’s other records’ time counts toward each week too. Use true for every one. Use a list of employers for only theirs. The time counts in the categories the step counts. These are every worked category, or those counts names. Each record flags its own weeks, about its own latest line. Its pay does not change. The other records are read as far back as weeks reaches.
[[layer.step]]id = "average"uses = "standard/average_limit"params = { over = "48h", weeks = 24, kind = "average_over_8h_a_day" }See the cookbook’s Germany working hours, Netherlands working hours and working time directive.
monthly_average_limit
Section titled “monthly_average_limit”At the end of each calendar month, this step raises kind about the month. It does so where the time counted in the last from to months months averages more than over a month. This holds for any span ending with that month. The months before are read as far back as months reaches.
| Parameter | Default | |
|---|---|---|
over, kind | required | |
from | 2 | The shortest span of months averaged, 1 or more. |
months | 6 | The longest span, from from to 12. |
counts | every worked category | |
window | calendar month | { every = "1mo", starts = "01-01" }. starts may name another month’s first day, such as "04-01". Nothing else is accepted. |
[[layer.step]]id = "average-over-80h"uses = "standard/monthly_average_limit"params = { over = "80h", kind = "overtime_and_holiday_average_over_80h", counts = ["overtime", "overtime_over_60h", "overtime_night", "overtime_over_60h_night", "holiday", "holiday_night"] }The recipe shows a common way to flag a monthly average of overtime. Check the rules where you operate. See the cookbook’s Japan overtime premiums.
weekly_rest
Section titled “weekly_rest”This step raises kind about the window’s latest line when its stretches with no time counted, each at least shortest long, come to less than at_least. Time that has not come yet counts as rest.
| Parameter | Default |
|---|---|
at_least | required |
shortest | at_least |
kind | weekly_rest_short |
counts | every worked category |
window | week |
[[layer.step]]id = "weekly-rest"uses = "standard/weekly_rest"params = { at_least = "36h" }See the cookbook’s Netherlands working hours and working time directive.
break_time
Section titled “break_time”This step raises kind about a day whose work comes to more than a tier’s after, with less than that tier’s at_least of breaks between its work segments. The highest tier the day passed decides. A break counts from shortest.
| Parameter | Default | |
|---|---|---|
tiers | required | Each { after, at_least }. |
shortest | 0s | The shortest gap that counts as a break. |
kind | break_short |
[[layer.step]]id = "breaks"uses = "standard/break_time"params = { tiers = [{ after = "6h", at_least = "30m" }, { after = "9h", at_least = "45m" }], shortest = "15m" }See the cookbook’s Germany working hours, Netherlands working hours and working time directive.
Break attestations
Section titled “Break attestations”An employee can attest to how a day’s breaks went. These steps read the break attestation of a day. The recipe shows a common way to use them. Check the rules where you operate.
attestation_required
Section titled “attestation_required”Raises kind about a day that has no attestation of its breaks. The day must have more than after of work, and all of that work must have ended.
| Parameter | Default |
|---|---|
after | 0s |
kind | attestation_missing |
[[layer.step]]id = "attested"uses = "standard/attestation_required"See the cookbook’s break attestation.
attested_break_premium
Section titled “attested_break_premium”Pays premium in category on a day whose attestation says a break (meal or rest) was missed, cut short or taken late. It does this even where the punches show the break taken. A day that already has time in category pays no second premium.
Run it after the step that pays the premium from the punches, meal_premium or rest_break_premium. A break waived of the person’s own choice owes nothing here.
| Parameter | Default | |
|---|---|---|
break | required | "meal" or "rest". |
category | required | Where the premium is paid. |
premium | 1h |
[[layer.step]]id = "attested_meal"uses = "standard/attested_break_premium"params = { break = "meal", category = "meal_premium" }See the cookbook’s break attestation.
attested_meal_waiver
Section titled “attested_meal_waiver”Moves what the step premium_step paid that day to to. This applies on a day worked no more than up_to, whose attestation says meal meal was waived of the person’s own choice. Run it after that step. A policy that allows no waiver leaves it out.
| Parameter | Default | |
|---|---|---|
premium_step, up_to, to | required | premium_step is the step whose premium is taken back. up_to is the longest day the waiver holds for. to is the category the time goes to (not paid). |
meal | 1 | Which of the day’s meals: 1 is the first. |
[[layer.step]]id = "meal_waiver"uses = "standard/attested_meal_waiver"params = { premium_step = "meal_premium", up_to = "6h", to = "meal_premium_waived" }See the cookbook’s break attestation.
piece_rate
Section titled “piece_rate”Pays each count of measure either each minor units, or the amount of the rate kind that matches the count’s context. A minor unit is the smallest unit of money, such as a cent: 250 is 2.50. The pay is money in the measure pay, in category, with the count’s context.
A count with no rate matching it pays nothing. A count whose rates tie raises rate_ambiguous and pays nothing until the tie is settled.
| Parameter | Default | |
|---|---|---|
measure | required | The count measure: "boxes". |
each or rate | one of them | A fixed amount per unit, in minor units; or a rate kind (rates). |
pay, category | required | The money measure and the category of the pay. |
[[layer.step]]id = "pieces"uses = "standard/piece_rate"params = { measure = "boxes", each = 25, pay = "pay", category = "piece_pay" }Ten boxes pay this line, beside the count: 2026-10-05 pay 2.50 USD piece_pay job=pack. See the cookbook’s piece rate.
productivity_bonus
Section titled “productivity_bonus”Pays per_hour minor units for each hour worked on a day with at least at_least units of measure an hour. The pay is money in the measure pay, in category. The rate is compared on exact time worked, never rounded hours.
| Parameter | Default |
|---|---|
measure, at_least, per_hour, pay, category | required |
counts | every worked category: the time worked |
[[layer.step]]id = "bonus"uses = "standard/productivity_bonus"params = { measure = "boxes", at_least = 12, per_hour = 150, pay = "pay", category = "bonus" }96 boxes in 8 hours earn 12.00. 95 boxes the next day earn nothing. See the cookbook’s productivity bonus.
allowance
Section titled “allowance”Pays an amount an hour, as money in the measure pay, in category. The amount is worked out once for the window, for each rate. It is added on the window’s last day worked, so it is never rounded hour by hour.
| Parameter | Default | |
|---|---|---|
pay, category | required | |
per_hour | An amount in minor units, or a table of amounts by the context value by: { evening = 100, night = 150 }. | |
by | The context value per_hour’s table is keyed by. | |
per_hour_from | { hierarchy, key }: the amount in the metadata of the person’s organization of that hierarchy that day, or of the nearest one above it that has it. | |
basis | worked | worked time, or scheduled: the time of the scheduled shifts with shift_values, worked or not. |
shift_values | none | For scheduled: the shifts’ values. |
context | none | Only work of these values. |
counts | every worked category | |
window | period |
[[layer.step]]id = "differential"uses = "standard/allowance"params = { by = "shift", per_hour = { evening = 100, night = 150 }, pay = "differential", category = "shift_differential" }An evening shift earns 1.00 an hour, and a night shift 1.50. A day shift with no amount earns nothing. Every worked category counts, so an overtime hour on nights earns it too. A paid lunch set up as not worked earns none.
See the cookbook’s shift differential, site allowance and on call.
earnings
Section titled “earnings”Prices the window’s hours as money in measure. Each line is priced at the rate of kind rate that its context matches. That is multiplied by its category’s premium in per cent.
Earnings are worked out once for the window. They are added, for each category, context and rate, on the latest workday of the window that has such a line. They carry the work’s context. The days before it show the hours and no money in their ledgers. The window’s money is the sum of its days.
A category that premiums doesn’t name earns nothing. A line that no rate matches earns nothing and raises kind. So the missing rate is asked for instead of guessed.
| Parameter | Default |
|---|---|
rate, measure, premiums | required |
kind | no_rate |
window | period |
[[layer.step]]id = "wages"uses = "standard/earnings"params = { rate = "pay", measure = "wages", premiums = { work = 100, overtime = 150 } }40 hours of work at 20.00 are 800.00. 5 hours of overtime at 150 per cent are 150.00. A premium takes hundredths of a per cent: 117.5 pays an annual leave loading of 17.5 per cent. See the cookbook’s staffing agency.
tip_credit
Section titled “tip_credit”Makes up the difference between what the window’s hours must pay at minimum and what the cash_wage and reported tips pay. The difference is paid as money in pay, in category, on the last day worked.
| Parameter | Default |
|---|---|
tips, cash_wage, minimum, pay, category | required |
counts | every worked category |
window | week |
[[layer.step]]id = "tip-credit"uses = "standard/tip_credit"params = { tips = "tips", cash_wage = 213, minimum = 725, pay = "pay", category = "tip_makeup" }A server paid 2.13 an hour works 44 hours and reports 150.00 in tips. At 7.25, the week must pay 319.00. The cash wage pays 93.72 and the tips 150.00. So 75.28 is made up. See the cookbook’s tips.
Pay law and pay rates
Section titled “Pay law and pay rates”These steps work out a rate or an amount from the hours and money of a window. Steps that make up pay to a legal minimum, a regular rate or a supplement show a common way in their recipes. Check the rules where you operate. Send what the ledger holds to payroll, which pays.
regular_rate
Section titled “regular_rate”Works out the window’s regular rate. It pays each category in premiums its per cent of that rate. Overtime at 50 pays the half on top of straight time.
The rate is built in three parts:
- Each hour worked (
hours) is priced at therateits context matches. - The money in the
includescategories is added. - The total is divided by the hours worked.
The window’s days before the pay period count. Their premium time was paid in the period before. It is made up to the week’s rate, and not taken back. An hour that no rate matches raises kind.
| Parameter | Default | |
|---|---|---|
measure, premiums | required | The money measure, and each category’s per cent: { overtime = 50 }. |
rate or includes | one at least | The rate kind each hour is priced at, and the categories whose money is added to the pay. |
hours | every worked category | The categories whose hours are counted. |
kind | no_rate | The exception raised for an hour no rate matches. |
window | week |
[[layer.step]]id = "overtime-premium"uses = "standard/regular_rate"params = { rate = "pay", measure = "wages", premiums = { overtime = 50 } }See the cookbook’s regular rate overtime, fluctuating workweek, overtime cost spread and staffing agency.
spread_overtime_premium
Section titled “spread_overtime_premium”Spreads the money that the steps in steps added, the overtime premium, over the values of the labor context dimension by. The spread is in proportion to the hours worked at each value. The dimension can be a location, a cost center, an assignment, or an organization level the setup implies from one.
The days of the window before the pay period count.
The parts add up to the money exactly. Each value takes the whole minor units of the running total not yet given. What is left below a unit carries forward to the next. Each part names its value. Hours with no value take their share with no value.
The hours and their straight time stay where they were worked, and the pay is the same. Run it after the steps it names.
| Parameter | Default |
|---|---|
by, steps | required |
counts | every worked category |
window | week |
[[layer.step]]id = "spread"uses = "standard/spread_overtime_premium"params = { by = "location", steps = ["overtime-premium"] }See the cookbook’s overtime cost spread.
spread_overtime_hours
Section titled “spread_overtime_hours”Puts the window’s own time in each of categories at the values of by, in proportion to the hours worked at each. The money in those categories goes with it, straight time and premium alike.
It shares the money out as spread_overtime_premium does. A value over its share gives its latest time in the category to the values short of theirs. Only the line’s by changes. The hours by category and the money are the same. The hours at each value are not.
Run it after the steps that pay the hours. Hours priced after it are priced as the value they were put at.
| Parameter | Default |
|---|---|
by | required |
categories | ["overtime", "double_time"] |
counts | every worked category |
window | week |
[[layer.step]]id = "spread"uses = "standard/spread_overtime_hours"params = { by = "location" }See the cookbook’s overtime cost spread.
minimum_wage
Section titled “minimum_wage”Adds what the window’s hours are paid short of the minimum rate that each matches. The hours are paid at rate. It is worked out for the hours of each minimum. Pay above one minimum makes up none of another.
The money in the includes categories is taken off the shortfall. An example is tips where a tip credit is allowed.
A week split by a pay date is checked whole, less what the earlier period made up. What was made up is not taken back.
| Parameter | Default |
|---|---|
rate, minimum, pay, category | required |
includes, counts | none; every worked category |
window | week |
[[layer.step]]id = "minimum"uses = "standard/minimum_wage"params = { rate = "pay", minimum = "minimum", pay = "wages", category = "minimum_wage_makeup" }The recipes show a common way to set minimum wages by location. Check the rules where you operate. See the cookbook’s minimum wage by location and UK minimum wage.
minimum_wage_and_overtime
Section titled “minimum_wage_and_overtime”Adds what the window’s hours are paid short of what a minimum rate owes them. This covers hours whose context matches that rate. The rate is a host country’s.
The hours are paid at rate times their category’s per cent in premiums. They are owed the minimum for every hour. They are also owed each of tiers’ per cent of it, for the hours of that minimum past the tier’s over. That is the host’s overtime premium.
The hours of each minimum are worked out together. Pay above one makes up none of another’s. An hour that no minimum matches is owed nothing.
The shortfall is added with the minimum’s last line’s context, on the window’s last own day worked. A week split by a pay date is compared whole, as minimum_wage checks it.
| Parameter | Default | |
|---|---|---|
rate, premiums, minimum, pay, category | required | The rate the hours are paid at, each category’s per cent of it, the minimum rate kind, the money measure and the category of the added pay. |
tiers | required | Each { over, percent }: past over hours of a minimum, that per cent of it. |
counts | every worked category | |
window | week | week or day. |
[[layer.step]]id = "host-minimum"uses = "standard/minimum_wage_and_overtime"params = { rate = "pay", premiums = { work = 100, overtime = 150 }, minimum = "minimum", tiers = [{ over = "35h", percent = 125 }, { over = "43h", percent = 150 }], pay = "wages", category = "posting_makeup" }The recipe shows a common way to make a posted worker’s pay up to a host country’s rates. Check the rules where you operate. See the cookbook’s posted workers.
percent_premium
Section titled “percent_premium”Pays percent per cent, to the hundredth, of the rate each line’s context matches. It pays this for the line’s time counted inside the period during and on the days holidays says. The pay is money in pay, in category.
It moves no time, so such premiums add up. Like earnings, the money is worked out once for the window and added on the latest workday of it with such time.
| Parameter | Default | |
|---|---|---|
rate, percent, pay, category | required | The rate kind, the per cent, the money measure and the category of the pay. |
during, holidays | one at least | A period. For holidays: true (a holiday), a list of holiday ids, or false (none). |
counts | every worked category | |
window | period |
[[layer.step]]id = "night"uses = "standard/percent_premium"params = { rate = "pay", percent = 25, pay = "wages", category = "night_supplement", during = { daily = { from = "20:00", to = "06:00" } } }The recipe shows a common way to pay night, Sunday and holiday supplements. Check the rules where you operate. See the cookbook’s Germany supplements.
percent_of_pay
Section titled “percent_of_pay”Adds percent per cent, to the hundredth, of the window’s money of pay in the includes categories. It is added in category, on the window’s last day with such money. It fits holiday pay rolled up into each period’s pay, or vacation pay as a per cent of earnings.
| Parameter | Default |
|---|---|
pay, includes, percent, category | required |
window | period |
[[layer.step]]id = "holiday-pay"uses = "standard/percent_of_pay"params = { pay = "wages", includes = ["work", "overtime"], percent = 12.07, category = "rolled_up_holiday" }The recipe shows a common way to roll holiday pay up. Check the rules where you operate. See the cookbook’s rolled up holiday pay.
rest_days_share
Section titled “rest_days_share”On the window’s last day, adds money in pay, in category. The amount is the window’s money in includes, divided by its working days, times its rest days. The rest days are the days rest holds and those that observe a holiday. It pays a weekly rest on hourly pay and overtime.
| Parameter | Default | |
|---|---|---|
pay, category | required | The money measure and the category the pay goes to. |
includes | required | The categories whose money is shared. |
rest | { weekdays = ["sun"] } | A period: the rest days. |
window | period |
[[layer.step]]id = "paid-rest"uses = "standard/rest_days_share"params = { pay = "wages", category = "paid_rest", includes = ["work", "overtime", "overtime_100", "night", "night_hour", "overtime_night", "overtime_100_night"] }The recipe shows a common way to pay a weekly rest. Check the rules where you operate. See the cookbook’s Brazil working hours.
Certified payroll and prevailing wage
Section titled “Certified payroll and prevailing wage”These two work together on covered projects. The recipes show a common way to price the hours and write the form. Check the rules where you operate.
prevailing_wage
Section titled “prevailing_wage”This step applies to hours whose context matches a base rate. The base rate is a covered project’s classification. It makes those hours up to that rate times their category’s per cent in premiums, against the rate they are paid at. Each hour is on its own. The make-up is in category.
It also pays the fringe for every hour, not multiplied. The benefits and the pay rate above the base are taken off. The result is paid as cash in fringe_category.
Each is by the work’s context, on the window’s last own day with such hours.
| Parameter | Default |
|---|---|
base, rate, premiums, pay, category | required |
fringe, fringe_category | go together |
benefits | none |
window | week |
[[layer.step]]id = "prevailing"uses = "standard/prevailing_wage"params = { base = "prevailing_base", fringe = "prevailing_fringe", benefits = "benefits", rate = "pay", premiums = { work = 100, overtime = 150 }, pay = "wages", category = "prevailing_makeup", fringe_category = "fringe_cash" }See the cookbook’s prevailing wage.
certified_payroll
Section titled “certified_payroll”This is an exporter (payroll export), not a step of a layer. It writes a certified payroll of one project, as CSV. The content is that of form WH-347. There is a row for each person, week of the period, classification and rate of pay.
Each row has the straight and overtime hours of each of the week’s days. It also has the rates of pay, and the gross.
The rates are these:
- The pay rate raised to the
base. - Overtime at
overtime_premiumper cent. - The fringe left by the
benefits. - The pay above the base paid as cash.
prevailing_wage pays them in the same way. The deductions and net wages are left to payroll.
| Parameter | Default | |
|---|---|---|
project | required | The project the file is for. |
project_key | project | The labor context key that names the project. |
classification_key | classification | The labor context key that names the classification. |
straight | ["work"] | The categories written as straight hours. |
overtime | ["overtime"] | The categories written as overtime hours. |
rate | pay | The rate kind of the pay rate. |
base | none: the pay rate as it is | The rate kind the pay rate is raised to, as prevailing_wage has it. |
fringe | none: no fringe paid as cash | The rate kind of the fringe. |
benefits | none: nothing taken off the fringe | The money measure of the benefits paid, as prevailing_wage has it. |
overtime_premium | 150 | The per cent of the rate overtime is paid at. |
id_attribute | the person’s own id | The employment detail that holds the person’s id. |
name_attribute | none: the name column is empty | The employment detail that holds the person’s name. |
uses = "standard/certified_payroll"params = { project = "bridge-12", id_attribute = "payroll_id", name_attribute = "name", rate = "pay", base = "prevailing_base", fringe = "prevailing_fringe", benefits = "benefits" }See the cookbook’s certified payroll.
Accruals
Section titled “Accruals”accrue
Section titled “accrue”Earns earn of the accrual category for every per of time counted. The earning is in proportion. It never goes past a balance of cap. With tiers, each day earns at the tier of the person’s whole years of service that day. See accruals.
| Parameter | Default | |
|---|---|---|
category | required | The accrual category. |
earn, per | "1h" for every "30h": 15 hours earn 30 minutes. Or tiers. | |
tiers | Each { years, earn, per }. | |
service_from | hired | hired (the current hire) or first_hired. |
cap | none | The most the balance may reach. |
counts | every worked category | |
window | period |
[[layer.step]]id = "pto"uses = "standard/accrue"params = { category = "pto", earn = "1h", per = "30h", counts = ["work"], cap = "2h" }Forty hours a week earn 1h 20m. The second week would earn another 1h 20m, but the cap leaves room for 40 minutes. See the cookbook’s sick leave one per thirty and vacation by service.
Gives the year’s amount of category on the first day of each year. It gives it all at once, to everyone employed that day.
A person hired during the year is treated as new_hires says. With new_hires = "by_month", the person gets the share of the months left, on the hire date. With "none", the person gets nothing until the next grant.
| Parameter | Default |
|---|---|
category, amount | required |
year | { every = "1y", starts = "01-01" }; starts = "hire" grants on each anniversary |
new_hires | by_month |
[[layer.step]]id = "grant"uses = "standard/grant"params = { category = "pto", amount = "80h" }A person hired July 2 gets six months of 80 hours: 40 hours. See the cookbook’s annual grant.
carryover
Section titled “carryover”Forfeits the balance above limit as a year starts. It counts what the steps before it earned on the days before. In a pay period that crosses the year’s start, run it after the steps that earn by the day.
| Parameter | Default |
|---|---|
category, limit | required |
year | { every = "1y", starts = "01-01" } |
[[layer.step]]id = "carryover"uses = "standard/carryover"params = { category = "sick", limit = "40h" }50 hours of sick leave brought into January, with a limit of 40, lose 10 hours on January 1. See the cookbook’s sick leave carryover.
earn_limit
Section titled “earn_limit”Forfeits what the accrue steps earned of category in a year past limit. This happens as the time is earned.
| Parameter | Default |
|---|---|
category, limit | required |
year | the calendar year |
[[layer.step]]id = "yearly"uses = "standard/earn_limit"params = { category = "sick", limit = "40h" }See the cookbook’s earning capped each year.
carryover_payout
Section titled “carryover_payout”Pays out the balance above limit as a year starts. It is paid out as time in pay. limit = "0h" pays out all of it.
| Parameter | Default |
|---|---|
category, limit, pay | required |
year | the calendar year |
[[layer.step]]id = "vacation"uses = "standard/carryover_payout"params = { category = "vacation", limit = "40h", pay = "vacation_payout" }See the cookbook’s year end by category.
payout_on_leaving
Section titled “payout_on_leaving”On the person’s last day employed, pays out what is left of category as time in pay.
| Parameter | Default |
|---|---|
category, pay | required |
[[layer.step]]id = "leaving"uses = "standard/payout_on_leaving"params = { category = "comp", pay = "comp_payout" }See the cookbook’s comp time.
payout_unused_after
Section titled “payout_unused_after”On the window’s last day, pays out the balance of category that was not earned within the period within up to that day. It is paid out as time in pay. It pays out time not used in time. The oldest is used first. A hand adjustment counts as earned before.
| Parameter | Default | |
|---|---|---|
category, pay | required | The accrual category, and the category the time is paid out to. |
within | { last = "6mo" } | A period ending on the window’s last day. |
[[layer.step]]id = "toil-not-taken"uses = "standard/payout_unused_after"params = { category = "toil", pay = "toil_payout", within = { last = "6mo" } }The recipe shows a common way to pay out time off in lieu not taken within six months. Check the rules where you operate. See the cookbook’s Australian retail award.
accrue_per_day
Section titled “accrue_per_day”Earns earn of category for each day of the window with time counted. That is, days worked, counted.
| Parameter | Default |
|---|---|
category | required |
earn | 1h |
counts | every worked category |
window | period |
[[layer.step]]id = "days"uses = "standard/accrue_per_day"params = { category = "days_worked" }See the cookbook’s France forfait jours.
accrue_beyond
Section titled “accrue_beyond”Earns earn of category for every per of what the accrual category counter earned in year past after. This happens as the counter is earned. Run it after the steps that earn the counter.
| Parameter | Default |
|---|---|
category, counter, after | required |
earn | 1h |
per | 1h |
year | the calendar year |
[[layer.step]]id = "rest"uses = "standard/accrue_beyond"params = { category = "compensatory_rest", counter = "overtime_hours", after = "220h" }The recipe shows a common way to earn rest for overtime past a yearly quota. Check the rules where you operate. See the cookbook’s France overtime quota.
earned_over
Section titled “earned_over”Raises kind about a window. In that window, what category earned in year goes past over, or stays past it, while it earns more.
| Parameter | Default |
|---|---|
category, over, kind | required |
year | the calendar year |
[[layer.step]]id = "quota"uses = "standard/earned_over"params = { category = "overtime_hours", over = "220h", kind = "overtime_quota_passed" }See the cookbook’s France overtime quota and France forfait jours.
comp_time
Section titled “comp_time”Moves the pay period’s overtime in categories to to. The category to is worked and not paid. The move goes as far as the accrual category bank has room under cap, at earn for every per. The rest stays overtime, and is paid.
The room is the balance as the period opens, with its hand adjustments and the time used in it. An accrue step earns the bank from to. This step runs in the allocate stage.
| Parameter | Default |
|---|---|
to, bank, cap | required |
categories | ["overtime"] |
earn | 1h30m |
per | 1h |
[[layer.step]]id = "bank"uses = "standard/comp_time"params = { to = "comp_earned", bank = "comp", earn = "1h30m", per = "1h", cap = "240h" }The recipe shows a common way to bank compensatory time in place of paid overtime. Check the rules where you operate. See the cookbook’s comp time.
time_account
Section titled “time_account”Earns into category each window’s time counted less the target. The result can be more or less than nothing. Hours over the target add to the balance. Hours under it take from it.
The target is the window’s scheduled time (target = "scheduled", which ignores target_attribute). Or it is a duration for a whole window. That duration is the one in the employment attribute target_attribute where the person has one, else target.
The attribute’s value is text such as 37h 30m, or a number of hours such as 37.5. Any other value fails the person’s ledger, naming the attribute and the day.
A duration is shared by the days of the window on which the person is employed and the step applies.
| Parameter | Default | |
|---|---|---|
category, target | required | The accrual category, and the target. |
target_attribute | none | The employment attribute that holds a person’s own target. |
counts | every paid category: hours worked and paid leave | |
window | week |
[[layer.step]]id = "account"uses = "standard/time_account"params = { category = "time_account", target = "40h", target_attribute = "weekly_hours" }See the cookbook’s working time account.
balance_limit
Section titled “balance_limit”Raises kind about the window when the balance of category, as the next day starts, is above above or below below. A balance_limit step after time_account flags a balance beyond its limits.
| Parameter | Default |
|---|---|
category | required |
above, below | one at least |
kind | balance_limit |
window | week |
[[layer.step]]id = "limits"uses = "standard/balance_limit"params = { category = "time_account", above = "40h", below = "-20h", kind = "time_account_limit" }See the cookbook’s working time account.
Work periods and full-time status
Section titled “Work periods and full-time status”These steps report a person’s hours of service over a measurement window, and whether they were full time. A status is a fact for an export or an app to read. It is not a decision on benefits.
The quantity’s context names the days measured (measured_from, measured_to). It also names the days the status holds for (holds_from, holds_to).
Each step runs only in the pay period that holds its window’s last day. It reads the earlier periods of a long window from the ledger. Run them after the steps that add paid time, such as holiday pay. The recipe shows a common way to measure each method. Check the rules where you operate.
full_time_monthly
Section titled “full_time_monthly”Reports each calendar month the person was employed in, on its last day. The report is a quantity of the duration measure measure: its hours of service. The quantity is in the category full_time where the hours are per_month or more, else not_full_time. The status holds for that month.
| Parameter | Default | |
|---|---|---|
measure | required | The duration measure the hours are reported in. |
per_month | 130h | The hours of a month that make it full time. |
counts | every paid category: hours worked and paid leave | |
full_time | full_time | The category reported for a full-time month. |
not_full_time | not_full_time | The category reported otherwise. |
window | the calendar month |
[[layer.step]]id = "monthly"uses = "standard/full_time_monthly"params = { measure = "hours_of_service" }See the cookbook’s full-time status measurement.
full_time_look_back
Section titled “full_time_look_back”Reports the measurement period window, of 3 to 12 months, on its last day, as full_time_monthly does. The person is full time where the hours of service average per_month or more a month. The status holds for stability, starting administrative days after the period ends.
A window from hire is the initial measurement period of a person hired. Only the first is measured. A window from a date measures people employed from its first day.
| Parameter | Default | |
|---|---|---|
measure, window, stability | required | The measure, the measurement period, and how long the status holds. |
administrative | 0d | Days between the end of the period and the start of the status, up to 90d. |
per_month | 130h | The average hours a month that make a person full time. |
counts | every paid category | |
full_time, not_full_time | full_time, not_full_time | The status names reported. |
[[layer.step]]id = "standard-measurement"uses = "standard/full_time_look_back"params = { measure = "hours_of_service", window = { every = "12mo", starts = "10-15" }, administrative = "78d", stability = "12mo" }For the initial measurement period of a person hired, the same recipe uses window = { every = "12mo", starts = "hire" }. See the cookbook’s full-time status measurement.
days_present
Section titled “days_present”Reports each day of the window as a day present. A day present is a count of 1 in measure, in category. It carries the value as its context. It is reported in each value of the dimension by (a country) that any part of the day has.
A day has a value by its lines (those counts picks). With located, it also has values by the day’s work location. With residence, it has the value of that employment attribute on each day employed. value counts one value alone.
With days, it raises kind about that day’s latest line of that value. It does so on the day a value’s days in the period within come to that number. The period within is a tax year, a year at most.
The step takes measure, days or both. Where it raises, it reads back a year and a day.
| Parameter | Default | |
|---|---|---|
by | required | The dimension whose values are the countries. |
measure | none | The count measure the days are reported in. |
category | present | The category of the reported days. |
counts | every worked category | |
located | false | Count the values of the day’s work location too. |
residence | none | The employment attribute naming where the person lives. Its value counts on each day employed. |
value | none | Count one value of by alone. |
days | none | Raise kind on the day a value’s days come to this many. |
within | the calendar year | The span counted for days, a year at most: { every = "1y", starts = "04-06" }. |
kind | days_present | The exception raised. |
window | period |
[[layer.step]]id = "count"uses = "standard/days_present"params = { by = "country", measure = "days_present", located = true }
[[layer.step]]id = "uk-near-183"uses = "standard/days_present"params = { by = "country", value = "gb", located = true, within = { every = "1y", starts = "04-06" }, days = 150, kind = "near_183_days_gb" }Days present are facts for payroll, tax and social security systems to read. Time and Attendance decides no tax and no social security. See the cookbook’s days present by country and frontier workers.
time_share
Section titled “time_share”Raises kind about the window where a value of the dimension by (a country) has a share of the time counted (counts) of percent or more. The share is measured in the period within, up to the window’s last day. The value must have had less up to the day before the window’s first. This also holds the other way round. The exception says the share.
With value_attribute, only the value of that employment attribute (where the person lives) is looked at. Time with no value counts toward the whole only. The step reads back a year and a day.
| Parameter | Default | |
|---|---|---|
by, kind | required | The dimension whose values are the countries, and the exception raised. |
percent | 25 | The share flagged. |
value_attribute | none | The employment attribute naming the one value looked at. |
within | { last = "12mo" } | The span counted, a year at most. |
counts | every worked category | |
window | period |
[[layer.step]]id = "home-share"uses = "standard/time_share"params = { by = "country", value_attribute = "residence", percent = 25, kind = "residence_share_25" }The exception is raised once, when the share crosses percent. It is a fact for someone to review, not a decision. See the cookbook’s habitual work share.
Exceptions
Section titled “Exceptions”Raises kind when a shift’s first work starts with an in punch more than grace after the shift’s start. With points, the exception’s detail carries the points.
Work after a lunch punched out and back in is not the shift’s first. It is never late. Work with no shift is never late.
| Parameter | Default |
|---|---|
grace | 0s |
kind | late |
points | none |
Raises kind when a shift’s last work ends more than grace before the shift’s end. An out to lunch and back in is no departure.
| Parameter | Default |
|---|---|
grace | 0s |
kind | left_early |
points | none |
[[layer.step]]id = "late"uses = "standard/late"params = { grace = "5m", kind = "attendance_point", points = 0.5 }
[[layer.step]]id = "early"uses = "standard/early"params = { grace = "5m", kind = "attendance_point", points = 0.5 }With five minutes’ grace, an out at 15:55 for a 16:00 end is on time. One at 15:54 left early. See the cookbook’s late and early and attendance points.
no_show
Section titled “no_show”Raises kind about a day with a scheduled shift and no work, unless one of these holds:
- An override took the day off.
- The day has approved leave.
- With
holidays_off, the day is a holiday.
Leave still waiting for approval, or rejected, excuses nothing.
| Parameter | Default |
|---|---|
holidays_off | true |
kind | no_show |
points | none |
[[layer.step]]id = "no-show"uses = "standard/no_show"Say a person is scheduled Monday to Wednesday, works Monday, and is on approved leave Tuesday. Wednesday is a no_show, at the start of the day. See the cookbook’s no show.
Raises rest_too_short when the first work of a workday starts less than at_least after the last work of an earlier workday ended. The earlier workday can be in the previous pay period.
Work that runs on across a workday’s start is not a new start. It is the second piece of a split segment. Rest is counted from its end.
| Parameter | Default |
|---|---|
at_least | required |
[[layer.step]]id = "rest"uses = "standard/rest"params = { at_least = "10h" }Say a person is out at 23:00 on Monday and in at 08:09 on Tuesday, for a shift at 08:00. A late step has grace = "5m". Tuesday’s work is both late and rest_too_short. See the cookbook’s rest between shifts.
missed_break
Section titled “missed_break”Raises kind about a day with fewer breaks than one for each every of work.
| Parameter | Default |
|---|---|
every | 4h |
kind | missed_break |
[[layer.step]]id = "breaks"uses = "standard/missed_break"params = { every = "4h" }8 hours straight call for one break. With none, kind is raised. Exactly 4 hours call for none. See the cookbook’s missed break.
Raises kind, with detail, about each workday with work. With an eligibility rule on its layer, it flags the days of the people the rule picks.
| Parameter | Default |
|---|---|
kind | required |
detail | none |
[[layer]]id = "unlinked"applies_to = "unlinked = true"[[layer.step]]id = "who-is-this"uses = "standard/flag"params = { kind = "who_is_this", detail = "link them to the employee they are" }See the cookbook’s unlinked people.
Closed periods, approvals and export
Section titled “Closed periods, approvals and export”late_changes
Section titled “late_changes”Decides, change by change, whether a change to a closed pay period is taken into the open period as an adjustment or refused. A change neither limit refuses is adjusted. Without this step, the policy’s close.late_changes setting decides every change alike.
| Parameter | Default | |
|---|---|---|
adjust_up_to | none | A change is refused when it moves more than this much time. Each category’s change is counted, more or less. |
within | none | A period counted from the close, such as { next = "7d" }. A change recorded on a day it holds none of is refused. |
[[layer.step]]id = "late-changes"uses = "standard/late_changes"params = { adjust_up_to = "4h", within = { next = "30d" } }A change refused names who decided. The stamp of an adjustment line and the detail of a late_change_refused exception give this step and its layers. Or they give close.late_changes and the layers that gave the setting. They give default where no layer did.
See the cookbook’s late change limits.
approval
Section titled “approval”Decides what keeps a subject of approval from being approved. It also decides who approves its stages. A subject is a day, the period, a category’s lines, an entry, or an assignment’s work. Without an approve step, the approval rules’ own blocked_by_exceptions and approvers apply.
| Parameter | Default | |
|---|---|---|
blocks | every kind not excused | Where its rule says exceptions block: the kinds that do. |
never_blocks | none | Kinds that never block. |
routes | none | Each { stage, to, over, categories, attribute }. It sends its stage to to when all it gives holds. That means the subject’s time in categories (default every worked one) is over over. It also means the person’s employment attribute attribute is set on its last day. |
[[layer.step]]id = "approval"uses = "standard/approval"params = { never_blocks = ["late"], routes = [{ stage = "manager", to = "director", over = "50h" }] }See the cookbook’s approval routing.
This is an exporter (payroll export), not a step of a layer. A policy that uses it is an error.
It writes a header row, then one row per person, workday and paid pay category. Categories are in alphabetical order. A category that is not paid is left out.
The columns are person, first, last, workday, category and hours. first and last are the pay period’s first and last day. hours is decimal hours as the ledger has them, "8.00". Days with no lines have no rows.
| Parameter | Default | |
|---|---|---|
id_attribute | the person’s own id | The employment detail that holds the person’s id in the system the file is for (payroll_id). It is read as it stands on the period’s last day. A person without it stops the export, naming them. An id is never made up. |
codes | the setup’s codes, else the categories | The code of each category (an earning code). It is written in place of the category: { work = "REG", overtime = "OT" }. A category it does not name is written under the code the setup gives it. With codes given, a category with no code either way stops the export. Its hours are not sent under a guessed code. |
include_unpaid | false | true: the categories that are not paid are written too. |
by | day | period: one row per person and category for the whole period. Its workday is the period’s last. |
hourctl -t acme attend export run standard/csv 2026-10-05 --only approved \ --param id_attribute=payroll_id --employer acme-ca -o week.csvSee the cookbook’s payroll export.
daily_record
Section titled “daily_record”This is an exporter (payroll export), not a step of a layer. It writes a daily record of working time as CSV. There is a row for each person, workday and stretch of work.
The stretches are lines from punches in categories, joined where one ends as the next starts. Each row has the person’s id, the workday, the start and end, and the hours. The start and end are wall times with their offset in the day’s zone.
| Parameter | Default | |
|---|---|---|
id_attribute | the person’s own id | The employment detail that holds the person’s id. |
categories | every category | The pay categories whose lines are written: ["work", "overtime"]. |
uses = "standard/daily_record"params = { id_attribute = "dni", categories = ["work", "overtime"] }The recipe shows a common way to keep a record of each day’s start and end of work. Check the rules where you operate. See the cookbook’s Spain daily record.