Skip to main content

Chapter 54 — How pay is calculated

Every argument about a payslip ends in one of two places: the tax table, or the days. This chapter is the days. It follows one rule from the first of the month to the last: what a day is worth, which days earn it, and what turns a day from paid to docked. Learn it once and every absence line on every slip can be explained to the person it belongs to, which is the whole job when they ask.

What this chapter covers​

  • 54.1 Payable days and proration for joiners and leavers
  • 54.2 Absences, unpaid leave, half days
  • 54.3 Lates converted to absences
  • 54.4 Overtime, holiday and weekend work
  • 54.5 Sandwich rule and rest-day swaps in pay
  • 54.6 Fixed-pay shifts
  • 54.7 Computed lines: rules the company writes

The concept​

A monthly salary has to be cut into days before anything can be docked, and there are two common knives. Working-day proration divides the salary by the month's working days, so a day's value moves with the calendar and weekends are invisible. Calendar-day proration divides it by every day in the month, weekends included, so a day's value is stable and a weekend is something an employee can earn or lose. The second makes one more question unavoidable: is a weekend paid to someone who was absent on the Friday and the Monday around it? Most policies say no, and the name for that answer is the sandwich rule. Whatever the policy, it has to be the same for everyone and visible on the slip, or each docked day becomes a negotiation.

How Operentra handles it​

  • Calendar days: a day's pay is the gross salary divided by the number of days in the month, 31 in July, 28 in February.
  • Every day of the month is one of three kinds: before the joining date (never paid); a working day (paid by its attendance); a rest day, meaning a weekly-off day of the employee's shift or a company holiday (paid when earned, 54.5).
  • A working day pays in full when Present, Late, Early Leave, Work From Home or on paid leave; the leave type's share when on leave paid at a reduced rate (54.2); half when Half Day; nothing when Absent, on unpaid leave, or with no attendance record at all.
  • The slip shows the full contracted earnings, then the docked days as their own lines: Absence Deduction, Unpaid Leave Deduction and Late Coming Deduction. Income tax and percentage-of-gross deductions are worked on the pay actually earned.
  • The monthly late tolerance from Attendance Settings (Chapter 36) turns every full multiple of late arrivals and early leaves into a day's deduction.
  • Overtime hours are recorded and shown on the slip but not paid by the run; pay them as an adjustment (Chapter 56).
  • A shift with "attendance affects salary" off pays its working days whatever the attendance says.
  • Who reads it: anyone who can open the run (payroll.view); the employee sees the same lines on their slip.

Walkthrough​

Northwind's July 2026 run is locked and shows every case in this chapter except the last two. Its office shift rests on Saturday and Sunday, Independence Day fell on a Saturday, the late tolerance is four, and the workspace rounds to whole dollars (Chapter 53), so the amounts below are rounded the same way. Open Payroll › History, the July run, and expand an entry to read its breakdown and its attendance counts.

54.1 Payable days and proration for joiners and leavers​

The run counts payable days: the working days the employee earned plus the rest days they earned, against the days in the month. The day rate is the gross divided by the days in the month; Sigrid Vandermeer's 8,800 in July is 283.87 a day. Every day not paid becomes part of a deduction line at that rate, so the slip always reconciles: contracted earnings, minus the docked days, minus the statutory lines, is net.

A joiner is paid from the joining date. The days before it are not paid and appear in the Absence Deduction line. Rest days between the joining date and the first working day are not paid either, because the working day before them lies before the start: someone who joins on a Saturday is paid from Monday. The first month's slip therefore reads full earnings and one absence line for the days before the start, which is the honest presentation of a part month.

A leaver stays in the run until offboarding settles their separation (Chapter 83): a run takes active employees with a salary assignment in force for the month. Their working days after the last working day have no attendance and are docked like absences, so the last month's slip pays up to the last working day. Process and lock that month before completing the settlement: once settled, the employee is Separated and in no run, and the settlement itself does not include salary. On a fixed-pay shift nothing is docked; record a deduction for the days after the last working day (Chapter 56).

54.2 Absences, unpaid leave, half days​

Absent working days, working days with no attendance record and the missing half of each Half Day are docked at the day rate in the Absence Deduction line. Leonora Ivanauskas (gross 8,200, 264.52 a day) had two half days in July: on Monday 13 July she arrived 70 minutes late, which Northwind's thresholds grade a Half Day (54.3), and Wednesday 29 July was a half day taken with permission. The two missing halves make one day, 265 of absence deduction. Half days are not counted as Absent, so the slip's attendance strip shows them in a Half Days cell of their own, beside Absent, in any month that has some. A day with no record is docked like an absence: Rurik Halvorsen's Thursday 23 July was never marked, and cost 316, which is why a workspace whose attendance is incomplete must fix the month before processing it (Chapter 38); the pre-flight check refuses approval while anyone expected to have attendance has none (Chapter 55).

Leonora Ivanauskas's July entry expanded: the two half days' absence (265) and the late deduction (265) among the deductions, the employer's FICA match, and the attendance counts behind them

Unpaid leave (a leave type with Paid off, Chapter 45) is docked in its own Unpaid Leave Deduction line for the days of the leave that fall in the month: a leave inside the month counts its own day total; one that runs into the next month counts only its days in this one, the way the leave was counted. Paid leave days pay in full. The slip's attendance strip counts every leave day under Leaves, and adds an Unpaid Leave cell with the days docked when there are any.

Leave at reduced pay is paid leave whose type has a Pay under 100% (Chapter 45). Each day of it pays that share, and the rest joins the Unpaid Leave Deduction line, not the Absence line: four days of 50% leave in a month withhold two days' pay, and the entry's breakdown counts them as 2 under Unpaid Leaves. A half-day application withholds half as much, a quarter of a day at 50%. When the type's policy counts rest days (a sandwich rule), the weekends and holidays inside the leave are paid at the same share; otherwise they are paid in full. A day of such leave still counts as worked for the sandwich rule of 54.5, so the rest days around it are not forfeited, and a day inside the leave on which attendance shows the person at work is paid in full. Northwind has no such type, so its slips show none.

54.3 Lates converted to absences​

Lateness reaches pay in two ways. First, through the day's status. The late thresholds on Attendance Settings (Chapter 36) can grade a very late arrival or a very early departure as a Half Day or an Absent day, and the day is then docked as in 54.2.

Second, through the monthly tolerance. A Late or Early Leave day is a paid day, but the month's late arrivals and early leaves are added up, and every full multiple of Lates per month for Absent costs one day's pay in the Late Coming Deduction line. Northwind's tolerance is four. Augustin Beaulieu arrived late three times and left early once in July: four incidents, one day, 342. Imani Castellanos was late five times: still one day, 345, because the fifth starts the next four. Thandiwe Mokoena was late three times: under the tolerance, nothing. A day graded Half Day by the thresholds is not an incident; it is docked as a half day (54.2). A tolerance of zero switches the conversion off. The docked day was never paid, so, like an absence, it comes off taxable pay (Chapter 63). The slip's attendance strip shows both counts: late arrivals under Late, and early leaves in an Early Leave cell beside it in a month that has any, so Augustin's July strip reads Late 3 and Early Leave 1.

54.4 Overtime, holiday and weekend work​

Overtime approved in attendance (Chapter 39) is shown on every slip as hours. Whether it is paid depends on one thing: whether the employee's salary structure carries the Overtime component (Chapter 52). Without it, the hours are a count and nothing more, which is how every workspace starts, so adding the line is a decision you take knowingly; until then, pay overtime as an adjustment (Chapter 56).

Three things to know about that line. It is the Overtime component that came with the workspace: an earning coded OVERTIME that the company created itself, with an amount of its own, is paid as that amount like any other earning and prices no tiers. An hourly wage is the exception to "a count and nothing more": an hourly worker is paid for the hours worked, so with no Overtime line the hours beyond the standard day and the hours of a worked rest day are paid at the plain hourly rate, with no premium, and the checks before approval list those people as a warning. Do not add those hours again as an adjustment. And hours that were banked as time off when their request was approved (Chapter 36) are never priced, on any structure: payroll reads what each request became, not the setting on the day the run is processed.

With the line on the structure, the run prices the month's hours in tiers: overtime beyond the shift on a working day; every hour worked on a weekly-off day; every hour worked on a holiday; and, where the country sets a weekly limit, hours beyond it that the other tiers did not already pay. Each tier is paid at the hourly rate times the country's statutory multiplier (Pakistan pays double time on every tier; the United States time and a half beyond forty hours a week; the UAE one and a quarter, and one and a half on a rest day) or, where the law sets none, the Overtime Rate Multiplier from Attendance Settings (Chapter 36). The hourly rate is the basic salary over the month's standard hours (the shift's length times the scheduled working days) for a monthly salary, the day rate over the shift for a daily wage, and the rate itself for an hourly wage. The slip shows one Overtime line and the entry's breakdown lists the tiers.

Work on a rest day is therefore paid only through that tier: a weekly-off day or a holiday is paid as a rest day whether or not the person came in, and the hours they worked on it are priced as overtime when the structure pays overtime. The attendance views tag the worked day Holiday or Weekend so it can be seen (Chapter 37). A company that would rather give a day off in exchange uses a rest-day swap (54.5).

Daily and hourly wages earn differently from a monthly salary, and the run knows which it is paying from the salary record's pay basis (Chapter 52). A daily wage pays the rate for the working days actually worked: a half day pays half, approved paid leave pays a day, a weekly off or holiday pays nothing unless worked, and there is no absence deduction, because nothing was contracted for the days not worked. An hourly wage pays the rate for the regular hours attendance recorded and leave days at the standard hours, with overtime priced on top (or, on a structure with no Overtime line, every hour worked at the plain rate). The late-tolerance dock applies to all three, at a day's pay.

54.5 Sandwich rule and rest-day swaps in pay​

A rest day is earned when the nearest working day on each side of it was worked, at least as a half day. Skipping over other rest days in between, the run looks back to the last working day before it and forward to the first after it; if either was absent, on unpaid leave or without a record, the rest day is forfeited and docked in the Absence Deduction line. At the edges of the month a side that runs off the calendar counts as worked, so a weekend on the 1st is not lost to last month's attendance.

Sigrid was absent on Friday 3 July. The Saturday after it was Independence Day and the Sunday a weekly off; both look back to that Friday, so both were forfeited: one absence cost three days, 852 of her July Absence Deduction of 1,135 (the rest is two half days). Augustin Beaulieu took two days of unpaid leave on Thursday 15 and Friday 16 January, before a weekend and Martin Luther King Jr. Day on the Monday. The two leave days are in the Unpaid Leave Deduction line (645 on a gross of 10,000); the Saturday, Sunday and holiday after them looked back to an unpaid Friday and were forfeited, 968 of the 1,290 in his Absence Deduction line (the rest is two half days), with no absence at all. Five days for a two-day leave is the rule working as written, and the reason to explain it before someone books leave around a long weekend.

A rest-day swap (Chapter 38) changes which days are rest days for one employee in one month. The worked rest day becomes a working day, paid by its attendance like any other; the substitute day becomes a rest day, earned or forfeited by the sandwich rule. Someone who works a Sunday and takes the next Wednesday off is paid the same as an ordinary week, with no absence on the Wednesday. Northwind has recorded no swaps.

54.6 Fixed-pay shifts​

A shift with Attendance affects salary off (Chapter 35) is for people paid a fixed salary whatever their attendance, often directors and retained staff. Every working day of such a shift pays in full: an Absent, Half Day or missing record on that shift docks nothing, and its late arrivals and early leaves do not count toward the monthly tolerance. The rows stay in attendance and their counts still show on the slip, for the record. Unpaid leave, and the withheld share of leave at reduced pay, are still docked, because they are a decision about pay rather than a record of attendance. A shift whose attendance mode is Punch Not Required is always fixed-pay; the switch matters for the other modes. Northwind has no fixed-pay shift; every person is on the office shift.

54.7 Computed lines: rules the company writes​

Everything above is the engine's own arithmetic. A computed component (Chapter 51) adds a rule of the company's: a formula, or a tier table, priced every month from the same figures the engine has just worked out. Northwind's Attendance Allowance is if(absentDays == 0 and lateCount == 0, 2500, 0): 2,500 in a month with no absence and no late arrival, nothing otherwise. A commission line reads the month's sales reports, `min(salesMetric("new_sales")

  • 0.02, 25000)`; a performance bonus reads the merit points of Chapter 70 through a tier table.

A computed line is priced in structure order: it can read any line above it with component("CODE"), never one below, so two lines cannot depend on each other. It is priced at full value like any earning, so an absence shows as the Absence Deduction, not as a smaller allowance, unless the formula itself says otherwise with payableRatio or presentDays. It is never negative. It is taxed and counted toward the statutory bases by its own flags, on the amount actually paid: a commission paid in full to a mid-month joiner is taxed in full. A formula whose result is not a number, or is larger than a pay amount can be, fails that employee's entry and names the line, so nobody is paid a silent zero; dividing by zero gives zero by rule, and the form says so. And before it is saved, Preview on the component form prices it against any person and month, so HR reads the figure the run will produce rather than discovering it on the slip.

What happens next​

  • The run (Chapter 55) applies these rules to everyone at once and shows each entry's breakdown; reprocessing reapplies them after attendance is corrected.
  • Adjustments (Chapter 56) pay overtime and rest-day work and correct anything the rules cannot know.
  • Skip attendance deductions (Chapter 53) pays a whole run in full when the company decides so for a month.

What the employee sees​

Their slip: the earnings at the contracted figures, the Absence, Unpaid Leave and Late Coming lines, and the month's attendance counts (working days, present, absent, half days, leave, unpaid leave, lates, early leaves, overtime hours, holidays) that explain them.

Common mistakes​

  1. Processing before attendance is complete. A day with no record is docked; close the month first.
  2. Explaining a sandwich bite after the fact. Tell people before they book leave around a weekend or holiday; the summary on the leave form shows the leave days, not the forfeited weekend.
  3. Reading the Absence line as absences only. It also holds forfeited rest days, half days' missing halves, days without a record and a joiner's days before the start.
  4. Expecting overtime in the run. It is hours on the slip; the money is an adjustment.
  5. Paying weekend work by marking it Present. A rest day is paid the same either way; use a swap or an adjustment.
  6. Putting directors on the office shift. Their lateness docks pay; a fixed-pay shift exists for them.
  7. Setting the late tolerance to one. Every late arrival then costs a day, which is rarely the policy anyone wrote.
  8. Correcting attendance after locking. A locked run does not change; the correction is an adjustment next month.
  9. Reading the Unpaid Leave line as unpaid leave only. It also holds the withheld share of leave at reduced pay.
  10. A computed line that reads a line below it. component("X") can only read a line above. Saving the structure refuses it and names the line and the position; a structure saved before that check existed still fails the employee's entry at the run, with the line named. Either way the fix is the structure's order.

Practice​

Use your own trial workspace, not a customer's.

  1. Process a month (Chapter 55), expand one entry and divide the gross by the days in the month; check one deduction line against it.
  2. Mark an employee Absent on a Friday before a weekend (Chapter 38), reprocess them, and count the days in the Absence Deduction.
  3. Record a rest-day swap for the same employee for a worked Sunday and a later weekday off; reprocess and read the difference.
  4. Set the late tolerance to three, mark three Late days, reprocess, and read the Late Coming Deduction; set it back.
  5. Move an employee to a shift with Attendance affects salary off, reprocess, and confirm the absences no longer dock.
  6. Set a test leave type's Pay to 50 (Chapter 45), approve two working days of it for a test employee, reprocess them, and read the Unpaid Leave Deduction and the Unpaid Leaves count.

Quiz​

1. How is a day's pay worked out?

The gross salary divided by the number of days in the month; every docked day is charged at that rate.

2. When is a weekend day paid?

When the nearest working day before it and the nearest after it were both worked, at least as a half day; a side that runs off the month counts as worked.

3. What is in the Absence Deduction line?

Absent days, days with no record, the missing halves of half days, forfeited rest days, and a joiner's days before the joining date.

4. A tolerance of four; an employee is late three times and leaves early twice. What is docked?

One day in the Late Coming Deduction: five incidents hold one full multiple of four.

5. What does a fixed-pay shift still dock?

Unpaid leave, and the withheld share of leave at reduced pay; absences, half days, missing records and the late tolerance dock nothing on its working days.