Distribution ERP: Replacing an Outgrown Sage Setup Without Stopping Operations

Case study

Distribution ERP: Replacing an Outgrown Sage Setup Without Stopping Operations

All case studies

I replaced a Sage installation that a Tunisian electronics distributor had outgrown with a custom ERP covering finance, sales, purchasing, stock and company structure. Credit control, bank reconciliation and stock valuation moved out of spreadsheets and into one system, and a documented cutover plan let the company switch without losing its history.

5
Functional modules
Sage
Legacy system replaced
2
Stock valuation methods
3
Documents matched before paying a supplier

The problem

The distributor runs three activities at once: distribution, retail and installation. Its Sage installation could no longer follow, and every workaround had turned into a daily cost.

  • The same figure lived in three places. Credit control sat in a spreadsheet, bank reconciliation was manual and stock was counted separately, so none of the numbers agreed.
  • Generic ERP packages did not fit. Withholding tax, lettering, three way matching and dual stock valuation are everyday rules in Tunisian distribution, and packages built for other markets bolt them on until the bolt ons become the real system.
  • Stopping was not an option. Any replacement had to take over years of history without interrupting sales and deliveries.

The approach

I acted as functional analyst before acting as developer: every module was specified on paper before a line of code was written.

Five modules built on the real rules

  • Finance: invoices, receipts and payments, lettering, cheques and promissory notes, withholding tax, expense claims, bank reconciliation and automatic credit blocking.
  • Sales: the full quotation, order, delivery note and invoice chain, with credit notes, pricing rules and a CRM pipeline.
  • Purchasing: three way matching between purchase order, goods reception and supplier invoice before any payment goes out.
  • Stock: multiple warehouses, lot and expiry tracking, reservations, bills of materials for installation kits, and weighted average and FIFO valuation side by side.
  • Company structure: a status and permission matrix defining who can validate, modify or only read each document type.

The migration as a project of its own

I gave the cutover as much attention as the features. A gap analysis against the legacy system, a migration plan and a switchover runbook made it possible to leave Sage without losing history or halting daily work.

One stock for the shop and the back office

Orders placed on the online storefront land directly in the ERP, so the website and the warehouse share one stock level and one customer record.

Outcome

The distributor runs the ERP in production today.

  • One version of the truth: credit limits, lettering and stock valuation happen inside the system instead of in side spreadsheets.
  • Automatic credit control: orders from customers over their limit are blocked on their own.
  • Safer supplier payments: nothing is paid before order, reception and invoice agree.
  • History preserved: the company left Sage with its past data intact.

Because the modules encode the rules of Tunisian distribution rather than one company's habits, a second deployment is a scoping exercise on the chart of accounts, pricing rules and legacy data, not a rebuild. See the distribution ERP project page for the full module list.

Tech stack

React
TypeScript
PostgreSQL
Cloud SQL
Firebase Functions
Node.js
Tailwind CSS

Related services