HT Digital Solution logo HT DigitalSolution

Home  /  Blog  /  Attendance to payroll

From biometric punch to payslip, without the three-day scramble

Almost every factory we walk into already has biometric machines. Staff punch in and out, the devices work, and the data is sitting there. And yet, at the start of every month, two people disappear into a room with a stack of printouts and Excel, and payroll takes three days.

The machines were never the problem. The gap between a punch and a payslip is.

What actually sits in that gap

A biometric device records one thing: this employee touched this sensor at this time. Everything between that and a salary figure is business logic that lives, in most companies, in one person’s head:

  • Which shift was this person on that day, and did it change mid-month?
  • Is arriving at 9:07 late? What about 9:14? Is there a grace period, and does it reset monthly?
  • They punched in but never punched out — absent, or did they forget?
  • Two punches within a minute — one event or two?
  • Do the hours after 6 PM count as overtime, and at what multiple?
  • Half day, short leave, casual leave, annual leave — which balance does this come off?
  • Night shift crossing midnight — which day does it belong to?

When these rules live in a person, month end depends on that person. When they live in the system, month end is a button.

The four layers

Layer 1 — Get the raw data out, automatically

ZKTeco and similar devices can be polled over the network. A scheduled job pulls new punches every couple of hours into a raw table that is never edited. That is important: the raw log is your evidence. Every later stage reads it and writes elsewhere.

Automatic polling also removes the classic failure — a device fills up, starts overwriting, and nobody notices until the month is already gone.

Layer 2 — Turn punches into days

This is where the rules go. For each employee and date, the system decides: present, absent, late, half day, leave, holiday — plus in-time, out-time, hours worked, late minutes and overtime minutes.

Two details matter more than they look:

  • Late punches arriving out of order. A device that was offline can deliver yesterday’s punches today, and a naive process will treat a late-arriving morning punch as if it happened now. The result is a wrong in-time on a record HR already approved. Reprocessing has to be safe to run repeatedly and must not silently overwrite a manual correction.
  • Manual corrections must survive. Somebody forgets to punch; HR fixes it. If tomorrow’s reprocess wipes that fix, nobody will trust the system by the third month.

Layer 3 — Leave, with a real ledger

The most common design mistake in payroll systems is storing a leave balance as a number and adjusting it. Do that and within a year nobody can explain why someone has 4.5 days left.

Store leave as a ledger of entries — earned and used, each with a date and a reason. The balance is a calculation, never a stored figure. Then “why do I have four days?” has an answer you can print.

It also makes the awkward question easy: what was this person’s balance as at 31 March? With a ledger, that is a query. With a stored number, it is unanswerable.

Layer 4 — Payroll

With the first three layers correct, payroll becomes arithmetic: days present, overtime hours, allowances, deductions, loan instalments, tax. The month-end job runs in minutes, produces the salary sheet, the payslips and the bank transfer file, and — critically — can show the punch history behind any figure when an employee disputes it.

Five traps

  1. Rounding at the wrong stage. Round once, at the end, on the final payable figure. Rounding minutes at every step compounds into real money and arguments.
  2. Storing times as text in mixed formats. One inconsistent format in a legacy attendance table will break comparisons in ways that are extremely hard to find. Normalise on the way in.
  3. No audit trail on corrections. Every manual change needs who, when and why. This protects HR far more than it constrains them.
  4. Only testing the normal case. Test the night shift crossing midnight, the person who worked on a public holiday, the mid-month shift change, the resignation on the 14th.
  5. Going live without a parallel run. Run the new system alongside the old for one full month and reconcile every difference. Every difference is either a bug or a rule nobody had written down — and both are worth finding before the salary goes out.

What it looks like afterwards

In the units where we have done this, the pattern is consistent:

  • Payroll goes from days to under an hour, most of it checking rather than calculating
  • Attendance disputes drop, because the punch history is on screen in seconds
  • Overtime becomes visible per department, and usually falls once it is
  • Late-coming becomes a chart instead of an impression, which changes behaviour on its own
  • The register that used to take an afternoon becomes a report

None of this needs new hardware. The machines you already own are almost always enough.

Where to start

Two things you can check today, before talking to anyone:

  1. Can your devices be reached over the network from a server — do you have their IP addresses and admin credentials?
  2. Is your rule set written down anywhere — grace period, overtime multiplier, half-day threshold, leave entitlements? If not, writing it down is step one, and it is the step only you can do.

Want your month end to take an hour? We connect existing biometric devices to automated attendance and payroll, including the awkward rules your business actually runs on. See the HRM service or send us your setup — the assessment is free.