Skip to content

Certified payroll for a covered project

The rule

A contractor on a project covered by a prevailing wage law sends a certified payroll for each week worked on it (the federal form WH-347, or a state’s form like it). For each worker it lists the classification worked, the hours on each day of the week, straight time and overtime, the rates of pay, and the gross earned on the project; then the deductions and the net pay, and the contractor’s statement of compliance.

Who uses it

Contractors and subcontractors on public works: they submit it to the agency or the prime contractor every week the project runs.

How the recipe does it

An export names the standard exporter standard/certified_payroll and the project when the file is asked for, for the people of the pay period:

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" }

The file is CSV, a row for each worker, week, classification and rate of pay:

  • the lines whose context names the project (project_key, default project), in the classification their context names (classification_key, default classification);
  • the week’s seven days, each with its straight hours (straight categories, default work) and overtime (overtime, default overtime), the weeks counted from the pay period’s first day: a two-week pay period is two weeks;
  • the rates of pay, worked out as the prevailing_wage rule pays: the pay rate raised to the project’s base, with the fringe the benefits and the pay above the base leave, paid as cash; overtime at overtime_premium per cent (default 150) of the base pay, the fringe not multiplied. A rate that changes mid-week starts a row of its own;
  • the gross: the row’s hours at its rates;
  • the deductions (FICA, withholding, other, total) and net wages, left empty for payroll to fill in.

The worker’s id is the employment attribute id_attribute names, and their name the one name_attribute names; a person without the id stops the export.

The package’s one layer is the policy whose hours are written, as the prevailing_wage recipe has it.

What your setup needs

Set up before you adopt the recipe; the recipe’s steps read them by name, and adopting it is refused, with a list of what is missing, until they exist.

  • A measure called wages: the amount the recipe adds up (money in a currency, or a count).

The scenarios show each as it was set up for them.

Parameters

ParameterMeaning
projectThe project the form is for: the value of its context key.
project_key, classification_keyThe context keys of the project and the classification.
straight, overtimeThe categories of straight-time hours and of overtime.
rate, base, fringe, benefitsThe rate kinds of the pay rate, the base, the fringe and the benefits paid an hour.
overtime_premiumOvertime’s per cent of the base pay.
id_attribute, name_attributeThe employment attributes of the worker’s id and name.

What the scenarios show

  • a-week-on-the-project-by-classification: three days as an electrician, one with overtime, and one as a laborer: two rows, at 60.00 and 82.50, and at 35.00 and 50.00; the shop’s hours are not on the form.
  • a-new-rate-mid-week-is-a-row-of-its-own: a base raised on Wednesday gives two rows for the electrician.
  • a-two-week-pay-period-is-a-form-a-week: a row for each week of a two-week pay period.

This is a common way contractors prepare certified payrolls; check the rules where you operate and the form the agency asks for. Time and Attendance writes the hours, the rates and the gross for the project: payroll fills in the deductions and net pay, and the contractor signs the statement of compliance.

Get the recipe

The recipe’s package and its scenarios are in the example packages repository: attendance/certified_payroll. Test it, or your own copy of it, with hourctl attend test, and publish it with hourctl attend pkg publish.

The policy package

The package’s layers, with the standard steps each one runs and their settings:

certified_payroll/package.toml
name = "certified_payroll"
version = "1.0.0"
description = "A weekly certified payroll for each covered project: each worker, classification, hours by day (straight and overtime), rates of pay and gross for the project, for payroll to complete with deductions."
# What the tenant must have set up for the recipe: the steps read these by name.
[needs]
measures = ["wages"]
# The policy whose hours are written: weekly pay periods from a Monday,
# past 40 hours a week overtime, and the project's prevailing rates made
# up (`prevailing_wage`). The certified payroll itself is named when a
# file is asked for: standard/certified_payroll, with the project.
[[layer]]
id = "prevailing-wage"
settings = { pay_periods = { every_days = 7, from = "2026-10-05" }, week_starts = "monday" }
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { over = "40h", to = "overtime", 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" }

Scenarios

Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).

A new wage determination raises the electrician's base on bridge-12 from 45.00 to 47.00 on Wednesday. Paid 30.00 with 5.00 in benefits and a 20.00 fringe, Monday and Tuesday are paid 60.00 an hour and Wednesday 62.00: two rows, each with its own days, rates and gross
scenarios/a-new-rate-mid-week-is-a-row-of-its-own.toml
description = "A new wage determination raises the electrician's base on bridge-12 from 45.00 to 47.00 on Wednesday. Paid 30.00 with 5.00 in benefits and a 20.00 fringe, Monday and Tuesday are paid 60.00 an hour and Wednesday 62.00: two rows, each with its own days, rates and gross"
punch = [
{ at = "2026-10-05 07:00", kind = "in", values = { project = "bridge-12", classification = "electrician" } }, { at = "2026-10-05 15:00", kind = "out" },
{ at = "2026-10-06 07:00", kind = "in", values = { project = "bridge-12", classification = "electrician" } }, { at = "2026-10-06 15:00", kind = "out" },
{ at = "2026-10-07 07:00", kind = "in", values = { project = "bridge-12", classification = "electrician" } }, { at = "2026-10-07 15:00", kind = "out" },
]
[policy]
zone = "America/Los_Angeles"
[[employment]]
effective = "2024-01-08"
kind = "hired"
attributes = { payroll_id = "E1042", name = "Dana Reyes" }
[[measure]]
id = "wages"
kind = "money"
currency = "USD"
[[rate]]
kind = "pay"
amount = 3000
currency = "USD"
[[rate]]
kind = "benefits"
amount = 500
currency = "USD"
[[rate]]
kind = "prevailing_base"
matches = { project = "bridge-12", classification = "electrician" }
amount = 4500
currency = "USD"
to = "2026-10-06"
[[rate]]
kind = "prevailing_base"
matches = { project = "bridge-12", classification = "electrician" }
amount = 4700
currency = "USD"
from = "2026-10-07"
[[rate]]
kind = "prevailing_fringe"
matches = { project = "bridge-12", classification = "electrician" }
amount = 2000
currency = "USD"
[expect.export]
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" }
day = "2026-10-05"
file = """
project,week_ending,person,name,classification,day1_straight,day1_overtime,day2_straight,day2_overtime,day3_straight,day3_overtime,day4_straight,day4_overtime,day5_straight,day5_overtime,day6_straight,day6_overtime,day7_straight,day7_overtime,straight_hours,overtime_hours,straight_rate,overtime_rate,gross,fica,withholding,other_deductions,total_deductions,net_wages
bridge-12,2026-10-11,E1042,Dana Reyes,electrician,8.00,0.00,8.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,16.00,0.00,60.00,82.50,960.00,,,,,
bridge-12,2026-10-11,E1042,Dana Reyes,electrician,0.00,0.00,0.00,0.00,8.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,8.00,0.00,62.00,85.50,496.00,,,,,
"""
A company paid every two weeks still certifies each week: a Monday on bridge-12 in each week of the period is a row of each week, ending on its Sunday
scenarios/a-two-week-pay-period-is-a-form-a-week.toml
description = "A company paid every two weeks still certifies each week: a Monday on bridge-12 in each week of the period is a row of each week, ending on its Sunday"
punch = [
{ at = "2026-10-05 07:00", kind = "in", values = { project = "bridge-12", classification = "electrician" } }, { at = "2026-10-05 15:00", kind = "out" },
{ at = "2026-10-12 07:00", kind = "in", values = { project = "bridge-12", classification = "electrician" } }, { at = "2026-10-12 15:00", kind = "out" },
]
[policy]
zone = "America/Los_Angeles"
[[layer]]
id = "biweekly"
settings = { pay_periods = { every_days = 14, from = "2026-10-05" } }
[[employment]]
effective = "2024-01-08"
kind = "hired"
attributes = { payroll_id = "E1042", name = "Dana Reyes" }
[[measure]]
id = "wages"
kind = "money"
currency = "USD"
[[rate]]
kind = "pay"
amount = 3000
currency = "USD"
[[rate]]
kind = "prevailing_base"
matches = { project = "bridge-12", classification = "electrician" }
amount = 4500
currency = "USD"
[expect.export]
uses = "standard/certified_payroll"
params = { project = "bridge-12", id_attribute = "payroll_id", name_attribute = "name", rate = "pay", base = "prevailing_base" }
day = "2026-10-05"
file = """
project,week_ending,person,name,classification,day1_straight,day1_overtime,day2_straight,day2_overtime,day3_straight,day3_overtime,day4_straight,day4_overtime,day5_straight,day5_overtime,day6_straight,day6_overtime,day7_straight,day7_overtime,straight_hours,overtime_hours,straight_rate,overtime_rate,gross,fica,withholding,other_deductions,total_deductions,net_wages
bridge-12,2026-10-11,E1042,Dana Reyes,electrician,8.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,8.00,0.00,45.00,67.50,360.00,,,,,
bridge-12,2026-10-18,E1042,Dana Reyes,electrician,8.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,8.00,0.00,45.00,67.50,360.00,,,,,
"""
A week on bridge-12: Monday, Tuesday and Friday as an electrician (base 45.00, fringe 20.00), Wednesday as a laborer (base 28.00, fringe 12.00), Thursday in the shop. Paid 30.00 with 5.00 in benefits, the electrician is paid 45.00 and 15.00 of fringe in cash, 60.00 straight, and overtime at 67.50 and the same 15.00, 82.50; Friday's last 2 hours are the week's overtime: 24 straight hours and 2 overtime, 1605.00. The laborer's 8 hours are paid 30.00 and 5.00 of fringe, 35.00, 280.00. The shop's hours are no project's, and the deductions are left for payroll
scenarios/a-week-on-the-project-by-classification.toml
description = "A week on bridge-12: Monday, Tuesday and Friday as an electrician (base 45.00, fringe 20.00), Wednesday as a laborer (base 28.00, fringe 12.00), Thursday in the shop. Paid 30.00 with 5.00 in benefits, the electrician is paid 45.00 and 15.00 of fringe in cash, 60.00 straight, and overtime at 67.50 and the same 15.00, 82.50; Friday's last 2 hours are the week's overtime: 24 straight hours and 2 overtime, 1605.00. The laborer's 8 hours are paid 30.00 and 5.00 of fringe, 35.00, 280.00. The shop's hours are no project's, and the deductions are left for payroll"
punch = [
{ at = "2026-10-05 07:00", kind = "in", values = { project = "bridge-12", classification = "electrician" } }, { at = "2026-10-05 15:00", kind = "out" },
{ at = "2026-10-06 07:00", kind = "in", values = { project = "bridge-12", classification = "electrician" } }, { at = "2026-10-06 15:00", kind = "out" },
{ at = "2026-10-07 07:00", kind = "in", values = { project = "bridge-12", classification = "laborer" } }, { at = "2026-10-07 15:00", kind = "out" },
{ at = "2026-10-08 07:00", kind = "in", values = { project = "shop", classification = "electrician" } }, { at = "2026-10-08 15:00", kind = "out" },
{ at = "2026-10-09 07:00", kind = "in", values = { project = "bridge-12", classification = "electrician" } }, { at = "2026-10-09 17:00", kind = "out" },
]
[policy]
zone = "America/Los_Angeles"
[[employment]]
effective = "2024-01-08"
kind = "hired"
attributes = { payroll_id = "E1042", name = "Dana Reyes" }
[[measure]]
id = "wages"
kind = "money"
currency = "USD"
[[rate]]
kind = "pay"
amount = 3000
currency = "USD"
[[rate]]
kind = "benefits"
amount = 500
currency = "USD"
[[rate]]
kind = "prevailing_base"
matches = { project = "bridge-12", classification = "electrician" }
amount = 4500
currency = "USD"
[[rate]]
kind = "prevailing_fringe"
matches = { project = "bridge-12", classification = "electrician" }
amount = 2000
currency = "USD"
[[rate]]
kind = "prevailing_base"
matches = { project = "bridge-12", classification = "laborer" }
amount = 2800
currency = "USD"
[[rate]]
kind = "prevailing_fringe"
matches = { project = "bridge-12", classification = "laborer" }
amount = 1200
currency = "USD"
[expect.export]
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" }
day = "2026-10-05"
file = """
project,week_ending,person,name,classification,day1_straight,day1_overtime,day2_straight,day2_overtime,day3_straight,day3_overtime,day4_straight,day4_overtime,day5_straight,day5_overtime,day6_straight,day6_overtime,day7_straight,day7_overtime,straight_hours,overtime_hours,straight_rate,overtime_rate,gross,fica,withholding,other_deductions,total_deductions,net_wages
bridge-12,2026-10-11,E1042,Dana Reyes,electrician,8.00,0.00,8.00,0.00,0.00,0.00,0.00,0.00,8.00,2.00,0.00,0.00,0.00,0.00,24.00,2.00,60.00,82.50,1605.00,,,,,
bridge-12,2026-10-11,E1042,Dana Reyes,laborer,0.00,0.00,0.00,0.00,8.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,8.00,0.00,35.00,50.00,280.00,,,,,
"""