Write once, reverse never edit
Stock, cash, obligation and COD ledgers have database triggers that block UPDATE and DELETE. A mistake is fixed with a reversing entry, so every number stays traceable.
Internal software for inventory, sales, purchasing, warranty, finance and accounting: an append-only ledger that is reversed, never edited, department-scoped permissions, encrypted backups and weekly restore drills.
Internal pilot run


Stock, cash, obligation and COD ledgers have database triggers that block UPDATE and DELETE. A mistake is fixed with a reversing entry, so every number stays traceable.
Reservation, dispatch, handover, delivery, COD reconciliation and returns run on one engine; revenue is recognised at successful delivery, with average cost per item and warehouse.
Permissions are scoped across 6 departments and 4 levels instead of a flat list; delegation needs a reason, an expiry and an approver, and finance actions separate maker from checker.
Journal entries, sales, stock, cash and COD reconciliation, period close and financial statements; running as a draft against the current accounting software before becoming the official ledger.
Nightly backups plus transaction logs every 30 minutes, encrypted and pushed to a NAS and off-site storage; a restore drill runs weekly and alerts on failure.












Click an image to enlarge, use the arrow keys to browse.
ERP Tân Doanh is an app for inventory, sales, purchasing, warranty, finance and accounting, built for the Tân Doanh and IGA retail businesses. It is an internal project, in a pilot run and not public.
Stock, orders, COD, warranty and ledger figures lived in different places, each calculated its own way. Getting gross margin or carrier receivables meant manual reconciliation, and one wrongly edited old document could skew the numbers with nobody knowing where.
One web app, one PostgreSQL database and one rule: a posted ledger entry is never edited, only reversed.
Receipts, issues, transfers and stock counts, scanning by handheld scanner, camera or keyboard. Average cost per item and per warehouse; a warehouse is locked while it is being counted.
Quotes become orders, with stock reservation, dispatch, carrier handover, delivery, COD reconciliation and returns refunded at the discounted price.
Supplier orders, reorder suggestions and receiving against orders. RMA warranty cases link to existing warranty data and compute expiry from the label.
Cash accounts, receipts and payments, obligations, journal entries, reconciliation and financial statements. Accounting currently runs as a draft in parallel with the existing accounting software.
Department-scoped permissions, encrypted backups, weekly restore drills, and business tests that run inside a transaction and roll back so no data is dirtied.
In an internal pilot with data synced one way from the storefront and warranty systems. Every undecided business rule runs on a pre-selected option listed inside the app, so changing an option changes the reports in a controlled way.
Source code is not public, all rights reserved. The code of this project is not kept on the web server, so there is no license file to check against.
Developed for Tân Doanh.
The screenshots on this page were taken by me from the running version of the project.
See the License and credits page →
No list yet: the code of this project runs on another machine and I will add it once it has been scanned.

















