Ledgerdock n., 3PL billing
Month-end billing for small warehouses, without the spreadsheet.
Ledgerdock prices every pick, pack, pallet-week and shipment against each brand’s rate card, then issues numbered, taxed invoices.
- My part
- Design and build
- Built with
- Go, Postgres, htmx
- For
- Small 3PL warehouses
The problem
what month end looks like
A small warehouse stores and ships for a handful of online brands, each on its own rate card. At month end someone exports the activity, prices it line by line in a spreadsheet and types up the invoices.
Plate to comeA brand’s rate card.
Constraints
what it has to work within
One warehouse never sees another’s data. An issued invoice never changes, so a mistake is put right with a credit note. Money has to be exact to the cent, and tax differs from country to country.
Plate to comeAn issued invoice and its credit note.
What I built
the decisions, in order
Each warehouse walled off
The database itself keeps workspaces apart. Row-level security is forced on every table that holds a warehouse’s data, so a query that forgets its filter returns nothing rather than another warehouse’s rows.
A ledger that only grows
Charges are added and never edited. A wrong charge is reversed by an exact negative entry and charged again, so every invoice adds up from its lines.
See Plate III.
Money in whole cents
Amounts are stored as whole numbers of the smallest unit and rounded once, half away from zero, so totals never drift by a cent.
Invoice numbers with no gaps
Each warehouse has one locked counter a year, and a number is taken only when an invoice is issued. Credit notes run in their own series.
See Plate III.