Customization points
Every place you can change what Hour Advantage does has a recipe: a business use case, a policy package that implements it, and the scenarios that prove the change makes a difference (and that the default holds where it does not). The tables below map each customization point to the recipes that use it. Find the point you need to change, then read the recipes beside it.
Recipes are listed on the cookbook page by area and by region, and the Connect recipes on Connect policy recipes.
Time and Attendance
Stages
The standard steps
Settings
| Setting | Recipes |
|---|---|
zone, zones, a location’s zone | local_time_at_each_site, time_zones_in_one_day |
week_starts | nine_eighty_workweek, weekly_overtime |
day_starts | seven_minute_rounding (a-workday-starting-at-four) |
decimals | decimal_hours, tenth_hour_rounding |
pay_periods | weekly_overtime, california_overtime, nine_eighty_workweek, franchise_pay_rules, union_contract, automatic_close, annual_grant, leave_rules |
categories.*, categories worked and paid | paid_rest_breaks, automatic_meal_deduction, rounding_without_meals, on_call |
shifts.early | shift_differential, call_back_pay |
sides | staffing_agency |
accruals.since | sick_leave_one_per_thirty, annual_grant, leave_rules, balance_below_once_a_year |
accruals.leave_year_starts | balance_below_once_a_year (a-leave-year-from-july) |
close.late_changes | late_change_limits, automatic_close (a-late-punch-after-the-close-is-an-adjustment) |
close.after_days | automatic_close; unset by a layer (unset): without-after-days-nothing-closes |
Scenarios
| Point | Recipes |
|---|---|
Clock steps ([[clock]]: time passing, the periods closed then, the events told) | automatic_close |
A period’s approved | staffing_agency (the-bill-is-approved-once-every-client-has) |
An export of a side ([expect.export] side) | staffing_agency (billed-at-the-bill-rate) |
Layers
Eligibility keys
| Key | Recipes |
|---|---|
person | individual_agreement |
worker | individual_agreement (an-agreement-that-follows-the-worker) |
employer | joint_employment_overtime, work_in_several_countries, posted_workers |
unlinked | unlinked_people |
location | franchise_pay_rules |
jurisdiction | overtime_by_jurisdiction, daily_overtime_by_location, canada_employment_standards, posted_workers |
attributes.<name> | overtime_by_jurisdiction (a-contract-turns-overtime-back-on), minor_hours, work_period_overtime, pay_rate_by_hours_worked, comp_time, leave_increments |
under <hierarchy>:<org> | union_contract |
Policy packages
| Point | Recipes |
|---|---|
A package of layers (package.toml), adopted | every recipe |
A package’s own steps (main.lua) | payroll_export, staffing_agency (their exporters) |
| A shared package, adopted by many tenants | franchise_pay_rules, overtime_by_jurisdiction, working_week_by_law |
A version effective from a day | working_week_by_law (the-reform-applies-from-its-day) |
| Following a major version, pinning one | working_week_by_law (a-tenant-pinning-the-old-version-keeps-it) |
| A package’s locks refusing a tenant’s layer | franchise_pay_rules, working_week_by_law |
What a step reads
The standard steps the recipes use read these; a package’s own step reads them the same way.
| Helper | Recipes |
|---|---|
ctx:person(day): employment and attributes | holiday_pay_after_waiting_period, vacation_by_service, annual_grant, minor_hours, habitual_work_share, frontier_workers |
ctx:person(day).orgs and chain, organizations’ metadata | site_allowance |
ctx:person(day).location | local_time_at_each_site (the zone of the work location); daily_overtime_by_location (as the eligibility key jurisdiction); days_present_by_country (its values) |
ctx:person(day).unlinked | unlinked_people (as an eligibility key) |
A punch’s device (ctx.punches), with ctx:person(day).attributes | device_allowed_by_attribute |
ctx:other_records | joint_employment_overtime, two_employments_in_two_countries |
ctx:tenant().metadata | long_day_review |
ctx:day(date): shifts, holidays, leave | on_call, call_back_pay, holiday_pay_after_waiting_period |
ctx:at, ctx:weekday, ctx:add_days | weekend_premium, on_call, site_allowance |
ctx:rate, ctx:money_for, ctx:add_quantity | staffing_agency, piece_rate, tips, shift_differential, on_call, site_allowance, jury_duty_pay |
ctx:share, ctx:quantities of the days before the period | regular_rate_overtime (a-week-across-two-pay-periods-is-one-regular-rate), overtime_cost_spread (a-week-across-two-pay-periods-spreads-by-the-whole-weeks-hours) |
ctx:split_quantity, ctx:split_line, a quantity’s step | overtime_cost_spread |
ctx:average_week, looks_back as a function of the parameters | holiday_pay_average_earnings |
ctx:shifts_as_of, ctx.window.previous_end | predictive_scheduling |
ctx:run_on | brazil_clt_working_hours (through window_premium_run_on and shortened_hour_run_on) |
ctx:attestation(date), a line’s step | break_attestation |
ctx:add_hours | call_back_pay, on_call, reporting_time_pay, meal_period_premium |
ctx:balance_after, ctx:balance_changes | leave_rules, balance_below_once_a_year, protected_leave |
ctx:book | leave_on_holidays, leave_charged_before_announcement |
ctx.request.approved, ctx:day(date).holidays[i].announced | leave_charged_before_announcement |
ctx:leave_taken, ctx:earned | protected_leave, earning_capped_each_year, jury_duty_pay |
A leave request’s values (ctx.request.values) | bereavement_leave |
ctx:balance of an allocate step (reads_balances), ctx:pay_out | comp_time, year_end_by_category |
ctx:period and periods as parameters: a year by where it starts, a blackout, the weekend’s nights | balance_below_once_a_year, leave_rules, weekend_night_premium, night_differential, annual_grant, sick_leave_carryover, late_change_limits |
ctx:exception | attendance_points, unlinked_people, long_day_review, staffing_agency, device_allowed_by_attribute |
ctx:lines() and a line’s worked | shift_differential (a-paid-lunch-is-not-worked-and-earns-none) |
An exporter’s approved, of the period and of each line | staffing_agency (each-client-approves-its-own-placements-hours) |
An exporter’s line rates and time.money | staffing_agency (billed-at-the-bill-rate, an-invoice-works-the-money-out-once), certified_payroll |
An exporter’s time.add_days | certified_payroll (a-two-week-pay-period-is-a-form-a-week) |
Setup the policy reads
| Setup | Recipes |
|---|---|
| Assignments, implications, dimensions | staffing_agency, primary_assignment |
| Rates (pay and bill kinds, from a date) | staffing_agency, piece_rate, highest_rate_wins; a project’s rate table by classification: prevailing_wage (a-new-wage-determination-from-a-day) |
| Measures (counts and money), labor entries | piece_rate, productivity_bonus, tips |
| Shifts and shift definitions, with values | shift_differential, on_call, shift_matching |
| Schedule overrides | reporting_time_pay, no_show, overtime_after_schedule |
| Break attestations | break_attestation |
| Holidays | holiday_observance, holiday_pay_if_scheduled |
| Accrual categories and adjustments | sick_leave_carryover, leave_rules, balance_below_once_a_year |
| Approval rules, and stages waiting on an organization | approval_routing, staffing_agency |
Approval by assignment (subject = "assignment"), an assignment’s own organization | staffing_agency (each-client-approves-its-own-placements-hours, an-exception-holds-back-only-its-clients-hours) |
| Hierarchies and organizations | union_contract, site_allowance, staffing_agency |
| Work locations | overtime_by_jurisdiction, local_time_at_each_site, daily_overtime_by_location, work_in_several_countries |
A location’s values, the labor context its days’ work takes; implications from a clock’s site | work_in_several_countries |
Connect
| Point | Recipes |
|---|---|
route hook | route-by-work-code, multi-agency-clock |
joined hook | clock-lifecycle |
moved hook | clock-lifecycle |
back hook | clock-lifecycle, repaired-clock |
enrolled hook | link-by-pin, onboard-first, enroll-for-the-agency |
Effects: actions | clock-lifecycle, repaired-clock |
Effects: jobs | repaired-clock |
Effects: person (external_ids) | link-by-pin |
Effects: person (routes, labels, metadata) | enroll-for-the-agency |
Effects: delete | onboard-first |
Routes and their codes | route-by-work-code, multi-agency-clock, enroll-for-the-agency |
| Selectors (selectors): the device labels they pick by, read by a hook | onboard-first, multi-agency-clock, enroll-for-the-agency |
Selectors: the person labels a placement rule’s people picks by, written by a hook | enroll-for-the-agency |
Protocol packages: a message sent again
A device that did not get its reply sends the same message again, and what
a package does with the repeat is its own choice: keep it, pass it on with
the same key (the event id is made from the record, and Time and Attendance
keeps a punch once by it), or drop it. The bundled packages show dropping:
packages/zk/zk.lua (zk.attlog, a digest of each punch line, the last 500 in
the device’s store, scenarios *-resend.toml of the three ZK packages) and
packages/brightlink/cloud-1.0 (the message id, the last 256, 07-resend.toml).
The package tells the device OK for a repeat all the same, so the device goes
on. Both numbers are guesses at a generous margin, not checked against real
devices. The scenarios say the same batch twice gives one event and two OKs.
Points with no recipe
- Effects:
commands: a command is the protocol package’s own, by name (actions), so a recipe would hold for one make of clock only. A hook names commands as it names actions. - Connect shared policy packages: any recipe above is published as a
shared package (
hourctl pkg publish --shared) and adopted as Time and Attendance’s are (franchise_pay_rules,working_week_by_law).
Each recipe’s layers
Each package layer is listed with its eligibility rule, where it has one,
then its settings and its steps (standard/ left off). Scenarios with a
layer of their own are those that show a variant, or, for
individual_agreement, union_contract and the shared packages, the
tenant’s own layer the recipe is about.
| Recipe | Package layers: settings and steps | Scenarios with a layer of their own | Lua left |
|---|---|---|---|
aca_full_time_status | measurement: pay_periods, full_time_look_back, full_time_look_back | the-monthly-method-instead | none |
accrual_waiting_period | sick-leave: pay_periods, accruals, accrue, leave_waiting_period, leave_balance | a-wait-of-six-months | none |
alternative_workweek | four-tens: after_schedule, unscheduled_day, threshold, threshold | - | none |
annual_grant | grant: pay_periods, accruals, grant | - | none |
approval_routing | approval: late, threshold, approval | - | none |
balance_below_once_a_year | leave: pay_periods, accruals, leave_balance, leave_balance_below | twice-a-year-allows-a-second, a-leave-year-from-july, keeping-a-day-in-hand, keeping-a-day-in-hand-in-a-new-year, a-year-that-starts-under-the-amount, a-hand-adjustment-under-the-amount-counts | none |
attendance_points | points: late, early, no_show | - | none |
australian_retail_award | award: window_premium, one_longer_day, threshold, premium, window_premium, threshold, premium, window_premium, window_premium, window_premium, earnings; casual (attributes.employment = casual): params wages; rostered-days-off (attributes.rdo = true): accruals, params weekly, accrue_per_day; time-off-in-lieu (attributes.toil = true): accruals, comp_time, accrue, payout_unused_after; broken-shifts (attributes.broken_shifts = true): spread_of_hours, split_shift_allowance; minimum-engagement (attributes.employment in (casual, part_time)): minimum_engagement; shiftworkers (attributes.shiftworker = true): leave_rostered_penalties | - | none |
automatic_close | close: pay_periods, close | without-after-days-nothing-closes | none |
automatic_meal_deduction | meal: categories, auto_meal, threshold | - | none |
bereavement_leave | bereavement: leave_days_per_request | a-day-for-anyone-else | none |
brazil_clt_working_hours | jornada: pay_periods, shortened_hour_run_on, threshold, threshold, premium, window_premium, window_premium_run_on, window_premium_run_on, window_premium_run_on, earnings, rest_days_share; hour-bank (attributes.hour_bank = true): accruals, comp_time, accrue, payout_unused_after | a-collective-agreement-allows-a-year, an-agreement-shortening-the-clocks-night-alone | none |
break_attestation | breaks: categories, meal_premium, rest_break_premium, attested_break_premium, attested_break_premium, attested_meal_waiver, attestation_required | - | none |
california_overtime | overtime: pay_periods, threshold, consecutive_day, threshold | - | none |
california_split_shift | split-shift: split_shift_pay | - | none |
call_back_pay | call-back: threshold, minimum_pay | a-call-back-across-midnight | none |
canada_employment_standards | pay: earnings, percent_of_pay; vacation-6 (attributes.vacation_weeks = 3): params vacation-pay; ca-on (jurisdiction = ca-on): threshold, holiday_pay_from_earnings; ca-bc (jurisdiction = ca-bc): threshold, threshold, holiday_pay_from_earnings; ca-ab (jurisdiction = ca-ab): threshold, threshold, holiday_pay_from_earnings; ca-on-averaging (jurisdiction = ca-on and attributes.averaging_weeks = 2): params weekly; ca-ab-averaging (jurisdiction = ca-ab and attributes.averaging_weeks = 4): params weekly; ca-bc-averaging (jurisdiction = ca-bc and attributes.averaging_weeks = 4): params daily, after_schedule, params weekly | - | none |
certified_payroll | prevailing-wage: pay_periods, week_starts, threshold, prevailing_wage | a-two-week-pay-period-is-a-form-a-week | none |
colorado_overtime | overtime: attribute, threshold, threshold, threshold | - | none |
comp_time | overtime: pay_periods, accruals, threshold; comp-time (attributes.comp_time = true): comp_time, accrue, payout_on_leaving; safety (attributes.comp_time = true and attributes.safety = true): comp_time (cap) | - | none |
daily_overtime_by_location | us-ca (jurisdiction = us-ca): threshold; us-ak (jurisdiction = us-ak): threshold; us-nv (jurisdiction = us-nv and attributes.nv_daily_overtime = true): threshold; us-co (jurisdiction = us-co): threshold | - | none |
days_present_by_country | days-present: days_present (four) | - | none |
decimal_hours | hours: decimals, threshold | tenths-of-an-hour | none |
device_allowed_by_attribute | devices: device_allowed | - | none |
double_punch_lockout | punches: lockout, join | - | none |
earning_capped_each_year | sick-leave: pay_periods, accruals, accrue, earn_limit | a-year-from-the-anniversary-of-hire | none |
eight_and_eighty_overtime | overtime: pay_periods, threshold, threshold | paid-weekly-the-fourteen-days-run-on | none |
floating_holidays | floating: pay_periods, accruals, carryover, grant, leave_balance, leave_increment | - | none |
forgotten_clock_out | longest-shift: longest_shift | flagged-not-closed | none |
fluctuating_workweek | fluctuating-workweek: threshold, regular_rate | - | none |
france_forfait_jours | forfait (attributes.forfait_jours = true): accruals, accrue_per_day, earned_over | - | none |
france_overtime | 35-heures: threshold | - | none |
france_overtime_quota | contingent: accruals, threshold, accrue, accrue_beyond, earned_over | half-an-hour-for-each-hour-in-a-small-company | none |
france_rtt | rtt: accruals, threshold, accrue | - | none |
franchise_pay_rules | pay: pay_periods; overtime: threshold | a-location-adds-its-own-layer, a-location-cannot-loosen-the-overtime | none |
frontier_workers | holidays: location_holidays, holiday_pay; days-present: days_present | - | none |
germany_supplements | zuschlaege: earnings, percent_premium, percent_premium, percent_premium | - | none |
germany_working_hours | arbeitszeit: limit, average_limit, rest, break_time | - | none |
habitual_work_share | work-share: time_share | - | none |
highest_rate_wins | rates: rate_tie, piece_rate | the-job-rate-is-preferred | none |
holiday_observance | holidays: observe, holiday_pay | a-saturday-holiday-is-not-observed | none |
holiday_pay_after_waiting_period | holiday-pay: holiday_pay | the-scheduled-time-is-paid | none |
holiday_pay_if_worked_around | holiday-pay: holiday_pay, holiday_attendance | - | none |
holiday_pay_if_scheduled | holiday-pay: holiday_pay | - | none |
holiday_worked_premium | holidays: holiday_pay, premium | night-shifts-around-the-holiday, split-at-midnight-pays-the-holidays-hours | none |
individual_agreement | company: threshold | an-agreement-that-follows-the-worker, everyone-else-keeps-the-company-rule, the-agreement-is-theirs | none |
japan_overtime_premiums | labour-standards: pay_periods, window_premium, threshold, threshold, threshold, window_premium (four), limit (four), monthly_average_limit, earnings | - | none |
joint_employment_overtime | acme-ca-joint (employer = acme-ca): threshold | - | none |
holiday_pay_average_earnings | holiday: leave_average_pay | - | none |
jury_duty_pay | jury-duty: pay_periods, leave_make_up_pay, leave_days_within | a-fixed-jury-fee-when-none-is-entered, a-day-with-no-rate-is-raised | none |
holiday_entered_after | late-holidays: holiday_entered_after | announced-after-the-day, announced-before-the-day | none |
late_and_early | attendance: late, early | - | none |
late_change_limits | late-changes: late_changes | too-long-after-the-close-is-refused | none |
leave_increments | sick-hours: leave_increment; exempt-days (attributes.exempt = true): leave_increment | - | none |
leave_charged_before_announcement | charged-before-announcement: leave_charged_before_announcement/leave_charged_before_announcement, leave_balance, holiday_pay | approved-before-the-announcement-stays-charged, approved-after-the-announcement-is-not-charged | none |
leave_on_holidays | leave-on-holidays: leave_not_on_holidays, leave_balance, holiday_pay | without-the-recipe-the-holiday-is-drawn | none |
leave_not_counted_toward_overtime | overtime: holiday_pay, threshold | a-company-that-counts-leave | none |
leave_rules | leave: pay_periods, accruals, leave_balance, leave_blackout, leave_notice, leave_route | - | none |
local_time_at_each_site | sites: window_premium | - | none |
long_day_review | review: limit | - | none |
meal_period_premium | meal-premium: categories, meal_premium, second_meal_premium | - | none |
mexico_federal_labour_law | jornada: threshold, threshold, threshold, premium, earnings; rest-day-monday (attributes.rest_day = monday): params rest-day, premium | - | none |
minimum_wage_by_location | minimum-wage: minimum_wage | tips-count-where-a-tip-credit-is-allowed | none |
minor_hours | minors (attributes.minor = true): limit, limit, work_during | - | none |
missed_break | breaks: missed_break | - | none |
netherlands_working_hours | arbeidstijdenwet: limit, limit, average_limit, average_limit, weekly_rest, rest, break_time | - | none |
nevada_daily_overtime | overtime: threshold | - | none |
night_differential | differential: window_premium | - | none |
new_zealand_holidays_act | holidays-act: accruals, substitute_day_unless_scheduled, attribute, premium, holiday_pay_otherwise_working, alternative_holiday, earnings, leave_weekly_pay, accrue; average-daily-pay (attributes.daily_pay_varies = true): disable public-holiday-not-worked, holiday_average_daily_pay | - | none |
nine_eighty_workweek | workweek: pay_periods, week_starts, threshold | - | none |
no_pyramiding | overtime: premium, threshold, threshold | overtime-first-then-the-holiday-premium, a-company-that-counts-holiday-hours-toward-overtime | none |
no_show | no-show: no_show | pending-leave-and-a-working-holiday | none |
on_call | on-call: allowance, premium, minimum_pay | - | none |
overnight_shifts | overnight: attribute, threshold | whole-to-the-day-it-ends, whole-to-the-day-it-starts, a-whole-night-the-clocks-go-back-pays-the-hour-repeated, a-whole-night-the-clocks-go-forward-pays-the-hours-worked, a-night-across-the-start-of-the-workweek | none |
overtime_after_schedule | after-schedule: after_schedule | unscheduled-days-as-regular | none |
overtime_by_jurisdiction | weekly: threshold; ca-on (jurisdiction = ca-on): params weekly; ca-bc (jurisdiction = ca-bc): threshold; au (jurisdiction = au): params weekly; gb (jurisdiction = gb): disable weekly | a-contract-turns-overtime-back-on | none |
overtime_cost_spread | overtime: threshold, earnings, regular_rate, spread_overtime_premium | daily-overtime-and-double-time-are-spread-too, without-the-spread-the-branch-worked-last-carries-it, the-overtime-hours-themselves-instead, a-week-across-two-pay-periods-spreads-by-the-whole-weeks-hours | none |
overtime_equalization | equalization: pay_periods, accruals, threshold, accrue, accrue, accrue, carryover, carryover, carryover | a-contract-that-equalizes-each-quarter | none |
paid_rest_breaks | rest-breaks: categories, long_break | breaks-count-as-worked, only-short-breaks-are-paid | none |
pay_rate_by_hours_worked | pay: pay_periods, accruals, earnings; electrician-apprentices (attributes.classification = electrician_apprentice): accrue, rate_by_hours | - | none |
payroll_export | daily: threshold | one-line-per-earning-code | fixed_width, an exporter: the payroll system’s fixed-width file layout |
piece_rate | pieces: piece_rate | one-rate-for-everything | none |
philippines_premium_pay | premium-pay: threshold, premium, premium, premium, premium, unscheduled_day (six), holiday_pay, holiday_pay_if_present_before, window_premium (twelve), earnings | - | none |
predictive_scheduling | fair-workweek: short_rest, schedule_change_pay | a-flat-amount-for-each-clopening | none |
public_holidays_by_location | holidays: location_holidays, holiday_pay; gb (jurisdiction in (gb-eng, gb-sct)): substitute_day; de (jurisdiction in (de-by, de-be)): params holiday-pay | - | none |
posted_workers | polish-contract (employer = acme-pl): threshold, threshold, rate_tie, earnings; posted-to-france (jurisdiction = fr): minimum_wage_and_overtime | - | none |
prevailing_wage | prevailing-wage: pay_periods, week_starts, threshold, prevailing_wage | - | none |
primary_assignment | assignment: assign | a-preference-that-does-not-fit | none |
productivity_bonus | bonus: productivity_bonus | - | none |
protected_leave | family-leave: pay_periods, accruals, accrue, leave_eligibility, leave_entitlement, leave_balance_first, leave_balance | a-leave-year-from-july, twelve-months-from-the-first-use, the-rolling-twelve-months-before-each-use, a-use-more-than-twelve-months-back-is-not-counted, an-earlier-use-asked-for-later-counts-against-the-uses-after-it, past-the-entitlement-flagged-for-the-approver, a-lower-bar-of-hours, not-eligible-flagged-for-the-approver, service-from-the-current-hire; the others turn eligibility off to show the entitlement alone | none |
rolled_up_holiday_pay | pay: earnings; rolled-up (attributes.rolled_up_holiday_pay = true): percent_of_pay | vacation-pay-of-four-per-cent | none |
regular_rate_overtime | overtime: threshold, earnings, allowance, regular_rate | overtime-at-the-rate-of-the-job-it-is-worked-on, a-meal-premium-is-paid-at-the-regular-rate, a-week-across-two-pay-periods-is-one-regular-rate | none |
reporting_time_pay | reporting: minimum_pay | half-of-the-scheduled-shift | none |
rest_period_premium | rest-premium: categories, meal_premium, rest_break_premium | - | none |
rest_between_shifts | rest: attribute, rest | - | none |
rounding_without_meals | rounding: categories, round | rounding-every-punch-would-shorten-the-meal | none |
seven_minute_rounding | rounding: round | a-workday-starting-at-four | none |
shift_differential | differential: allowance | overtime-on-nights-earns-it-too | none |
shift_matching | matching: match, late | - | none |
sick_leave_carryover | sick: carryover, accrue | - | none |
sick_leave_one_per_thirty | sick-leave: accruals, threshold, accrue | - | none |
site_allowance | remote: allowance | - | none |
snap_to_schedule | snap: match, grace | no-shift-and-lunch-punches | none |
spain_daily_record | jornada: categories | overtime-is-part-of-the-day | none |
split_shift_premium | split_shift: split_shift | - | none |
staffing_agency | agency: threshold, threshold, earnings, regular_rate | the-pay-goes-in-the-measure-named | payroll and invoice, exporters: the agency payroll’s file layout and each client’s invoice, its hours priced at their bill rates |
tenth_hour_rounding | rounding: decimals, round | - | none |
time_zones_in_one_day | workdays: attribute, threshold | - | none |
tips | tip_credit: tip_credit | a-higher-cash-wage-leaves-less-to-make-up, a-higher-minimum-asks-more, the-make-up-goes-where-the-policy-names | none |
two_employments_in_two_countries | working-time: average_limit | - | none |
uk_contract_overtime | contract: holiday_pay, shift_position, threshold, shift_position, window_premium, earnings | the-employer-chooses-the-hours-after-the-shift-first | none |
uk_holiday_entitlement | holiday: accruals, carryover, grant; irregular-hours (attributes.irregular_hours = true): disable grant, accrue | - | none |
uk_statutory_sick_pay | ssp: leave_waiting_days; from-day-one (from 2026-04-06): params waiting | - | none |
uk_minimum_wage | minimum-wage: pay_periods, minimum_wage | - | none |
union_contract | company: pay_periods, threshold | a-contract-counts-overtime-by-the-fortnight, a-long-day-is-double-time-for-members, another-unions-members-keep-the-company-week, members-get-the-contracts-week, the-new-contract-from-its-first-day | none |
unknown_punch_direction | direction: direction | nearer-the-start-or-the-end | none |
unlinked_people | unlinked (unlinked = true): flag | - | none |
vacation_by_service | vacation: accrue | earlier-service-when-the-policy-counts-it, the-cap-stops-the-tiers-earning | none |
weekend_night_premium | weekend-nights: window_premium | - | none |
weekend_premium | weekend: premium | split-at-midnight-the-saturday-hours-are-weekend | none |
weekly_overtime | overtime: week_starts, attribute, threshold | a-week-across-two-pay-periods | none |
work_in_several_countries | holidays: location_holidays, holiday_pay; german-contract (employer = acme-de): limit, limit | - | none |
work_period_overtime | pay: pay_periods; fire (attributes.service = fire): threshold; police (attributes.service = police): threshold | a-seven-day-work-period | none |
working_week_by_law | working-week: threshold | a-tenant-cannot-loosen-the-law | none |
working_time_account | konto: accruals, time_account, balance_limit | - | none |
working_time_directive | limits: average_limit, weekly_rest, rest, break_time; night (attributes.night_worker = true): average_limit; hazardous-night (attributes.night_worker = true and attributes.hazardous = true): limit | a-fixed-reference-period, forty-eight-hours-in-fourteen-days, an-individual-opt-out | none |
year_end_by_category | year-end: pay_periods, accruals, carryover_payout, carryover, carryover_payout | vacation-paid-out-at-a-leave-year-from-july | none |
Only two recipes keep Lua, and both for a file format: their three
exporters write the receiving system’s own layout (payroll_export’s
fixed-width file; staffing_agency’s payroll and invoice). The standard
package has the others: csv (payroll_export’s CSV of earning codes),
daily_record (spain_daily_record) and certified_payroll.
What the recipes need, and the standard step that does it
| Need | Standard step | Recipes |
|---|---|---|
| Tiers of one threshold | threshold tiers | california_overtime |
| A daily limit with one longer day a week | one_longer_day | australian_retail_award |
| Overtime over a fixed period of days of its own (14 days, a 7- to 28-day work period) | threshold window = { every, starts } | eight_and_eighty_overtime, work_period_overtime |
| No hour paid two premiums; which premium an hour gets | the order of premium and threshold, and their counts | no_pyramiding |
| Overtime counting other records | threshold others | joint_employment_overtime |
| A weekly average limit counting other records | average_limit others | two_employments_in_two_countries |
| The Nth consecutive day worked | consecutive_day | california_overtime |
| Overtime past the schedule | after_schedule | overtime_after_schedule |
| Time before, in and after the scheduled shift | shift_position | uk_contract_overtime |
| The hours taken first as overtime, a person’s own hours | threshold take_first, over_attribute | uk_contract_overtime |
| Punches within a grace of the shift | grace | snap_to_schedule |
| Leaving early | early | late_and_early, attendance_points |
| Points for attendance | kind, points on late, early, no_show | attendance_points |
| Automatic meal deduction | auto_meal | automatic_meal_deduction |
| Meal period premium | meal_premium | meal_period_premium, rest_period_premium |
| A second meal’s premium, one meal premium a day | second_meal_premium | meal_period_premium |
| Rest period premium | rest_break_premium | rest_period_premium |
| A break not provided, attested, pays its premium | attested_break_premium | break_attestation |
| A meal waived, attested, owes no premium on a short day | attested_meal_waiver | break_attestation |
| A day of work with no attestation, for review | attestation_required | break_attestation |
| A day beyond the schedule | unscheduled_day | alternative_workweek |
| Minimum pay (reporting, call-back, a call-out) | minimum_pay | reporting_time_pay, call_back_pay, on_call |
| A minimum engagement, a meal break keeping it one | minimum_engagement | australian_retail_award |
| Split shift premium | split_shift | split_shift_premium |
| Split shift premium at the minimum wage, less pay above it | split_shift_pay | california_split_shift |
| A split shift allowance in money, and work past a spread of hours | split_shift_allowance, spread_of_hours | australian_retail_award |
| A night hour shorter than an hour (52 minutes 30 seconds), counted toward overtime | shortened_hour | brazil_clt_working_hours (an-agreement-shortening-the-clocks-night-alone) |
| The night worked whole and worked on past its end is night to the end of the work: its premium and its shorter hour | window_premium_run_on, shortened_hour_run_on (ctx:run_on) | brazil_clt_working_hours |
| Missed breaks | missed_break | missed_break |
| Long breaks | long_break | paid_rest_breaks |
| A premium for the hours in a short rest, or an amount for each | short_rest, short_rest_pay | predictive_scheduling |
| Pay for a schedule changed inside its notice | schedule_change_pay | predictive_scheduling |
| Hours limits (a long day, a minor’s day or week) | limit | long_day_review, minor_hours |
| Work in hours flagged (a minor’s evenings and early mornings) | work_during | minor_hours |
| Time in a period of the day or week (nights, the weekend’s nights) | window_premium | night_differential, weekend_night_premium, local_time_at_each_site |
| Time on given days or work | premium | weekend_premium, holiday_worked_premium, on_call |
| Money an hour (a differential, an allowance, standby) | allowance | shift_differential, site_allowance, on_call |
| Earnings at a rate | earnings | staffing_agency, regular_rate_overtime |
| Overtime at the regular rate | regular_rate | regular_rate_overtime, fluctuating_workweek, staffing_agency |
| Overtime premium’s cost spread over the places worked | spread_overtime_premium | overtime_cost_spread |
| Overtime hours spread over the places worked | spread_overtime_hours | overtime_cost_spread |
| Tip credit | tip_credit | tips |
| A paid weekly rest on the pay of the period, overtime included | rest_days_share | brazil_clt_working_hours |
| Minimum wage by location, tips toward it | minimum_wage | minimum_wage_by_location |
| Prevailing wage by project and classification, its fringe met by benefits or cash | prevailing_wage | prevailing_wage |
| A flag on every day worked | flag | unlinked_people |
| Holiday pay after a waiting period | holiday_pay after_days | holiday_pay_after_waiting_period |
| Holiday pay for working the days around it | holiday_attendance | holiday_pay_if_worked_around |
| Holiday pay due only for presence or paid leave the workday before | holiday_pay_if_present_before | philippines_premium_pay |
| Holiday pay from the earnings of the weeks before, over a number or the days worked | holiday_pay_from_earnings | canada_employment_standards |
| Holiday pay on an otherwise working day, by the roster or the pattern of work | holiday_pay_otherwise_working | new_zealand_holidays_act |
| Holiday pay at the average daily pay of the year before | holiday_average_daily_pay | new_zealand_holidays_act |
| Leave at the greater of ordinary weekly pay and average weekly earnings | leave_weekly_pay | new_zealand_holidays_act |
| A day in lieu for a holiday worked on an otherwise working day | alternative_holiday, accrue | new_zealand_holidays_act |
| A yearly grant | grant | annual_grant |
| A carryover limit | carryover | sick_leave_carryover |
| Accrual by years of service | accrue tiers | vacation_by_service |
| Full-time status by the month or by look-back, reported with its hours | full_time_monthly, full_time_look_back | aca_full_time_status |
| A rate by the hours worked to date (rungs, steps), the hours kept as a balance | accrue, rate_by_hours | pay_rate_by_hours_worked |
| Counts of hours to date (overtime worked, refused and offered), started again each year | accrue (an hour an hour, by the day), carryover (limit = "0h") | overtime_equalization |
| Protected leave held to weeks of the usual week, in a period of the employer’s choice | leave_entitlement | protected_leave |
| Eligibility for protected leave by service and hours worked | leave_eligibility | protected_leave |
| Paid leave used before unpaid | leave_balance_first | protected_leave |
| Overtime banked as comp time under a cap | comp_time | comp_time |
| A balance paid out on leaving | payout_on_leaving | comp_time |
| Time banked and not used within a period of being earned, paid out | payout_unused_after | australian_retail_award, brazil_clt_working_hours |
| A waiting period before leave is used | leave_waiting_period | accrual_waiting_period |
| A yearly limit on what is earned | earn_limit | earning_capped_each_year |
| A carryover limit, the rest paid out | carryover_payout | year_end_by_category |
| Leave in whole increments | leave_increment | leave_increments, floating_holidays |
| A day of leave on a holiday booked at nothing | leave_not_on_holidays (ctx:book) | leave_on_holidays |
| A number of days of a kind of leave in a year | leave_days_within | jury_duty_pay |
| Make-up pay for leave paid elsewhere (jury duty) | leave_make_up_pay | jury_duty_pay |
| An average of hours a week over a reference period of weeks, flagged | average_limit | working_time_directive |
| An average of hours a month over any span of 2 to 6 months, flagged | monthly_average_limit | japan_overtime_premiums |
| Rest in each week, or each fortnight in stretches of a least length | weekly_rest | working_time_directive |
| Break time by the length of the day | break_time | working_time_directive |
| Holidays kept by each work location, a weekend holiday on the next free weekday | location_holidays, substitute_day | public_holidays_by_location |
| A weekend holiday moved for those not rostered that day (Mondayisation) | substitute_day_unless_scheduled | new_zealand_holidays_act |
| A host country’s minimum rate and overtime premium on the hours worked there, where higher than the contract’s | minimum_wage_and_overtime | posted_workers |
| Days present in each country, reported, and flagged in each country’s own tax year | days_present | days_present_by_country |
| The share of working time in the country of residence over 12 months, flagged at 25% | time_share | habitual_work_share |
| Each line records where it was worked: the day’s work location’s values, a clock’s site | a location’s values, implications | work_in_several_countries |
| Leave at the greater of its loading and the roster’s penalties | leave_rostered_penalties | australian_retail_award |
| Leave paid at the average pay of the weeks with pay before it | leave_average_pay | holiday_pay_average_earnings |
| Waiting days of a period of incapacity, linked periods for three years followed through their reports, waiting days removed from a day | leave_waiting_days | uk_statutory_sick_pay |
| Premiums as a per cent of the rate that add up (night, Sunday, holiday) | percent_premium | germany_supplements |
| A balance of hours over and under a target, its limits flagged | time_account, balance_limit | working_time_account |
| Earned past a yearly amount (compensatory rest past a quota), and passing it flagged | accrue_beyond, earned_over | france_overtime_quota |
| Days worked counted (rostered days off earned by the day) | accrue_per_day | france_forfait_jours, australian_retail_award |
| A daily record of each day’s start and end of work | daily_record (exporter) | spain_daily_record |
| Pay as a per cent of pay (rolled-up holiday pay, vacation pay) | percent_of_pay | rolled_up_holiday_pay |
| Days of leave by a value of the request (bereavement by relationship) | leave_days_per_request | bereavement_leave |
| Earning codes in an export | csv codes, by | payroll_export |
| A certified payroll of a project, a week at a time | certified_payroll | certified_payroll |
| Counting days worked, stretches of work, the instant some time has passed | ctx:days_worked, ctx:stretches, ctx:instant_after, ctx:lines(filter) | every step above |
| A day’s shifts as the schedule stood at an instant; when the work before a day ended | ctx:shifts_as_of, ctx.window.previous_end | predictive_scheduling |