case-study --logistics
§IV · PLATELogistics SaaS
Live · in productionA family road-transport business that ran on paper LR books and spreadsheets. Now it runs on this: lorry receipts, GST and TDS billing, payments, expenses and a customer portal. Getting the tax and the ledger right was most of the job.
project-brief --outcome-first
§IV · BRIEFWhat had to change
Replace paper LR books and disconnected spreadsheets without asking a working transport business to abandon its real billing and tax workflow.
What I shipped
A staff operations system plus customer portal for LRs, bills, allocations, expenses, rate cards, GST/TDS reports, financial years, PDFs, and accounting sync.
What the business gained
The business now runs daily shipment, billing, receivables, and reporting work from one source of truth, with customers able to see bills, shipments, and statements themselves.
screens --as-shipped
§IV · PLATES
systems --under-the-hood
§IV · SCHEMATIC- AB-BA deadlock fix, one global lock order
Removed Postgres 40P01 deadlocks in billing/payment flows by enforcing one global row-lock order, then revalidating data-dependent lock sets after acquisition.
- Proportional-TDS customer ledger
One ledger is the single source of truth: direct-vs-indirect payment attribution, TDS pro-rated across bills, on-account advances, opening-balance reconstruction. The staff ledger, customer portal, statements and reports all read from it, so balances cannot disagree.
- GTA GST/TDS computation engine
GTA reverse-charge GST and Section 194C dual-threshold TDS with PAN-type rate detection, behind one validated place-of-supply resolver (IGST vs CGST/SGST) shared by the GSTR-1 report and the accounting sync.
- Money-mutation invariants
Restore-before-cascade so unallocated credit never vanishes, reversed-payment-aware bill status, LR row-locking against double-billing, and epsilon-tolerant allocation math.
- Customer self-service portal
Read-only, group-aware access gives customers their shipments, bills, payment requests, and financial-year statement without exposing staff CRUD screens.
- Document and accounting pipeline
Pixel-faithful LR, bill, ledger, rate-card, and report PDFs are cached where safe, while Zoho export/import flows reuse the same validated tax and ledger rules.
context --how-it-works
§IV · NOTESNaveen Logistics runs its day on this. Staff write lorry receipts, roll them into bills, allocate payments against those bills, record expenses, and read receivables and profit without opening a spreadsheet.
An Indian financial-year context sits over everything, so lists, dashboards, reports and customer statements always agree about which year they are in. The customer portal carries opening balances forward and gives each account its own reconciled view of shipments, bills, dues and payment requests.
The hard part was never the screens. It was making money mutations safe under concurrency, keeping one set of tax rules behind both the GSTR-1 report and the Zoho export, and generating PDFs that match the paper forms the business has used for years. A driver does not care that the LR is generated. He cares that it looks like an LR.