// Case Study · Business System · ERP

Distribution ERP

An end-to-end operations platform for CV Anugerah Sejati, a building-materials distributor — controlling sales orders, purchasing, stock, invoicing and cashflow in one role-based workspace. Built and owned end to end, as its CTO and only engineer, and running in production.

Laravel · PHPLive in productionSolo build7 role workspaces
cvanugerahsejati.com · distribution control board
CV Anugerah Sejati ERP — distribution control board dashboard
7
role workspaces
60+
data models
29
domain services
real-time
month-end (was 2 days)
01

The problem

A building-materials distributor runs a dense operation: dozens of sales orders a day, stock that must be checked before a price is locked, supplier POs that have to tie back to real demand — plus invoices, delivery notes, payments and director approvals, all depending on each other.

Without one system, this scatters across spreadsheets, chats and manual notes: orders stall waiting on stock confirmation, receivables are hard to track, and no role has a clear place to work. Month-end alone took three people two days of copy-pasting Excel. What was needed wasn't a record-keeping app — it was a workflow that locks each step to the next.

02

What I built

One unified workspace across five core areas — Sales, Buying, Stock, Finance and Dashboard — on top of a clear, low-click operational flow.

01

Sales Order

Input customer, products, discounts, approval status and revisions — all without losing the order's context.

02

Stock Guard

Admins see live stock, shortages and actual price before an order moves forward, so nothing is promised that can't be delivered.

03

Purchase Flow

Supplier POs and product receipts link straight back to what sales actually needs — procurement and demand stay in sync.

04

Invoice Control

Delivery notes, invoices, payments and director approval all stay on the same track, end to end.

flow control
Order CheckPurchase ReceiptStock UpdateInvoice Payment
03

Under the hood

Role Workspace

Director, Sales Admin, Purchasing, Settlement, Tax, Sales and Customer each get their own work area — access separated by role at the policy layer, not just hidden in the UI.

Operational Queue

Orders, receipts, invoices and payments appear as a live work queue — “validate price”, “ready for delivery note”, “waiting on stock”, “credit review” — not decoration.

Finance Visibility

Receivables, payables, customer payments and supplier payments read fast in one place, with a director dashboard for P&L, cashflow and receivables.

Stock, costing & cashback

Self-updating stock, FIFO costing, partial payments and tiered cashback — the money math the business actually runs on.

Distribution Control Board

Live operational indicators (orders needing review, stock ready, active POs, monitored receivables) visualised with Chart.js.

Print-safe documents

Stable, production-grade print templates for invoices and delivery notes, generated server-side with dompdf — an overlooked detail that's critical in the field.

04

Stack

Backend

  • Laravel 10
  • PHP 8.1
  • Sanctum / Breeze
  • REST

Frontend

  • Blade
  • Alpine.js
  • Tailwind
  • Vite
  • Chart.js

Data & Docs

  • MySQL
  • dompdf (PDF)
  • PhpSpreadsheet
05

Outcome

Live in production as the backbone of the distributor's daily operations — not a demo, not a prototype.
Every step is locked to the flow (order → stock → buy → invoice → pay), cutting “hanging” orders and manual back-and-forth.
Each role works from its own queue while the director oversees and approves from one dashboard.
Financial visibility (receivables & payables) that used to be scattered across spreadsheets now reads in a single view.
// let's build

Need a system your team actually uses?

Tell me what's slowing your operations down — I'll tell you honestly how I'd build it.