Case Study: Replacing a Legacy FoxPro Payroll System with Web Software Built for Jamaica

A Jamaican payroll provider ran its customers' payroll on an old desktop program. We rebuilt it for the web without losing the tax logic hidden inside the old code.

The Codememory TeamCodememoryOct 1, 2026 6 min read
Calculator and pen on printed financial figures

Payroll is the least forgiving software a business runs. If a report is late, people complain. If a payslip is wrong, people do not get paid correctly, and the tax authority notices. So when a Jamaican payroll services company asked us to replace the desktop program it had used for years, the brief was simple to say and hard to do: make it modern, make it web-based, and make it produce the same numbers.

This case study covers the problem, how we approached it, and what the new system does. The client is ElitePro, a payroll services provider in Jamaica.

The problem

The client ran payroll for its customers on a legacy desktop program written in FoxPro, a database language from the 1990s. It worked, which is exactly what made it hard to replace:

  • It lived on one machine. Staff had to be at that computer to run payroll; employees had no way to see their own payslips online.
  • The tax logic was locked inside the old code. Years of rules, edge cases and adjustments were in the program, not written down anywhere.
  • Different customers had different pay cycles. Monthly, weekly and fortnightly payroll had to stay separate, per company.
  • The outputs mattered as much as the maths. Pay registers, statutory reports and bank files are what the client hands to its customers, banks and Tax Administration Jamaica.

A big-bang rewrite that "probably" calculates the same numbers was not an option. We have written before about migrating legacy systems without a big bang; payroll is the clearest example of why.

Our approach

1. Discovery before code

We started from the client's requirements, their worked examples in spreadsheets, and the old program itself. Where the business rules were not written down, we read the legacy code's tax routines directly, so the new system would follow the same logic rather than our assumptions.

2. A multi-company structure from day one

Each customer company is its own tenant with its own isolated pay cycles. A company might run a monthly cycle for regular staff and a separate one for executives; another might pay weekly. Data never crosses between them.

3. Roles that match how a payroll office works

Four roles control who can see and change what:

  • Super admin: manages companies, features, users and pay cycles across the platform.
  • Admin: runs a company and switches between its pay cycles.
  • Payroll officer: works only on the pay cycles they are assigned.
  • Read-only: can view records but cannot create, edit, close or approve anything.

4. Statutory maths that follows the calendar

Jamaican payroll deducts PAYE income tax, NIS, NHT, Education Tax and pension. Rates and thresholds change over time, and a pay period must be calculated with the rates that applied to it. The system stores every rate with the date it applies from, so re-running an old period gives the old answer and a new period picks up new rates automatically.

5. The hard edge case: joining mid-year with a P45

When someone joins a company partway through the tax year with a P45 from their previous employer, PAYE has to continue the year rather than start again. The tax-free threshold was already partly used at the old job, so the employee is taxed cumulatively, on year-to-date figures. If the previous employer withheld too much, the refund comes back through payroll: income tax on the payslip can be negative, and net pay can exceed gross pay that period.

We rebuilt this from the legacy program's own cumulative tax path and checked it against the client's worked scenarios. Where the client's spreadsheet and the old program disagreed, we wrote down each difference and asked the client to confirm which was right, rather than quietly picking one.

6. Outputs people can actually use

The pay register produces its outputs as both Excel and PDF, because accountants want spreadsheets and employees want documents. There is also a general ledger interface for the accounting side.

7. Self-service and an AI helpdesk

Employees get a self-service area to see their own records. An AI helpdesk, built on Anthropic's Claude, answers payroll questions in plain language and flags unusual changes between periods so a payroll officer can check them before closing.

The stack

  • Next.js and TypeScript for the web application.
  • PostgreSQL with Prisma for data, with migrations so the database changes in controlled steps.
  • Firebase Authentication for sign-in, with roles and company access stored in PostgreSQL.
  • Claude API for the helpdesk.

The calculation rules, such as which rates apply to which dates and how statutory results are revised, have their own automated tests, because payroll regressions are expensive and quiet.

What the client has now

  • Multi-company payroll in the browser, with monthly, weekly and fortnightly cycles kept separate.
  • PAYE, NIS, NHT, Education Tax and pension calculated from date-versioned rates.
  • P45 mid-year continuation that follows the legacy program's own logic.
  • Pay register outputs in Excel and PDF.
  • Clear roles for super admins, admins, payroll officers and read-only users.
  • Employee self-service and an AI helpdesk.

The engagement continues with the client's feedback rounds: each batch of feedback is checked, fixed and reported back with the evidence.

Lessons for anyone replacing an old system

  1. The old code is documentation. If rules are not written down, the legacy program is the most accurate description of how the business really works. Read it.
  2. Write down disagreements. When the spreadsheet, the old system and the people disagree, do not guess. List the differences and get a decision.
  3. Date everything that changes by law. Rates, thresholds and rules need effective dates, not overwrites.
  4. Design for the outputs. The reports people hand to banks and tax authorities are the product as much as the screens are.
  5. Separate tenants early. Adding multi-company support later is far harder than starting with it.

Questions to ask when choosing payroll software in Jamaica

Whether you build, buy or rent payroll software, these questions separate tools that work locally from tools that only look like they do:

  • Does it calculate all statutory deductions? PAYE income tax, NIS, NHT, Education Tax and HEART contributions, with the employer and employee portions where they apply.
  • What happens when rates or thresholds change? Who updates them, and are changes dated so earlier pay periods still calculate correctly?
  • Can it handle staff who join mid-year with earnings and deductions from a previous employer?
  • Does it produce the monthly and annual statutory returns and the payslips staff actually receive?
  • Can it pay salaries through local banks in the formats they accept?
  • Who can see what? Payroll data is sensitive; roles and an audit trail matter.
  • Can you export your data if you change provider?

Foreign payroll products often handle the basics and fail on the local details. Ask for a demonstration with your own awkward cases.

Why testing matters most in payroll

A payroll error affects someone's income and the employer's legal filings. Automated tests for each rule are the only practical way to change payroll software with confidence.

Need something similar?

Payroll, HR, job tracking, approvals and reporting all fall under what we call custom web apps: software built around how your business actually works. We are based in Jamaica and the United States, and we understand local statutory rules as well as the software.

Have an old system that only one computer, or one person, understands? Talk to us about replacing it safely. Read more about our approach in what a custom web app costs.

Frequently asked questions

PAYE income tax, NIS, NHT, Education Tax and pension, using rates stored with the dates they apply from, so a pay period is always calculated with the rates that were in force at the time.

We read the legacy program's own tax routines and rebuilt its logic, then compared results against the client's worked examples. Where the client's spreadsheet and the old program disagreed, we documented the difference and asked the client to confirm.

Yes. Payroll, HR and internal tools are custom web app projects. We start with discovery to map your rules, then build in phases.

#case study#payroll software#jamaica#legacy migration#nextjs#postgresql
The Codememory Team
Codememory