Ten years of manual calculation, replaced by one system
Logistics · Singapore
The problem
A logistics business deploying workers to client sites across Singapore. For more than ten years the operation ran on paper and spreadsheets: attendance written down at each site, hours and overtime worked out afterwards, then client invoices and worker wages calculated by hand from the same sheets.
It worked — the business grew on it. But it cost days of administration every month, and the part that mattered more was that nobody could be certain the numbers were right. Rates differ by site, by day shift or night shift, by weekday, Saturday, Sunday and public holiday. Overtime, unpaid breaks, late arrivals, early departures, team-lead and forklift allowances each move the figure again. Do that arithmetic by hand a few hundred times a month and mistakes stop being a risk and become a certainty; the only open question is which direction they run in, and whether they land on the client's invoice or the worker's pay.
What we built
A single web application covering the whole cycle, from a worker clocking on at a site to the figure that appears in the monthly accounts. The office and the supervisors work in the same system, and every number downstream is calculated from the same source.
- Sites and rate matrices — each client site carries its own shifts, billing rates and pay rates across day and night, weekday, Saturday, Sunday and public holiday, plus unpaid break deductions, a late-arrival grace period and allowances that stack
- Timesheets with an approval pipeline — entered against a shift, submitted, approved or rejected with a reason, and locked once used downstream
- Hours and overtime calculated automatically — overtime measured against that shift's own standard hours, penalties and allowances applied by rule rather than by memory, and Singapore public holidays recognised without anyone remembering to check
- Client invoicing — approved timesheets turned into a per-site breakdown with GST, exported to Excel, with a paid and cancelled status trail
- Worker payment runs — daily, weekly or monthly, combining wages with approved reimbursements and deductions, output with the bank details needed to pay
- Leave — recorded per worker with overlap and timesheet conflict detection, so leave and attendance cannot contradict each other
- Accounting ledger and dashboard — paid invoices and payment runs post themselves to the ledger, manual entries go through approval, and a cash-basis dashboard shows realised and pending profit and loss side by side
Where the certainty comes from
Getting the arithmetic right was the easy half. The harder half was making it impossible for the same money to be counted twice, or for a figure to change quietly after someone had relied on it.
- A timesheet that has been invoiced or paid is locked. It can only be edited by cancelling the invoice or the payment run first, which releases it explicitly rather than silently
- Hours can only be billed once and paid once — anything already committed to an invoice or a payment run is excluded from the next one by construction, not by somebody checking
- Invoice totals are snapshotted, so changing a site's rates next quarter does not rewrite what a client was charged last quarter
- Permissions are set per feature and per role, so the person entering timesheets, the person approving them and the person handling money need not be the same person — and on the ledger, nobody approves their own entry
- Every consequential action is written to an audit log: who changed what, when, and what it was before
Under the hood
Built as a React front end and a Python API over PostgreSQL, deployed on AWS with separate test and live environments, managed secrets, database migrations applied automatically on release, and generated invoice and payment files kept on durable storage. Passwords hashed, sessions short-lived, and access tokens rotated on every refresh. None of this is visible to the person using the system, which is rather the point.
Outcome
Work that took days of manual calculation each month is now produced from data entered once, at the site, by the person who was there. Invoices and payroll are generated rather than assembled, and the two reconcile because they are derived from the same approved records.
The saving in time was the reason the project started. The saving that turned out to matter more is certainty — the figures can be traced back to a specific approved timesheet, by a named person, on a known date. A number you can defend is worth more than a number you arrived at quickly.