← Selected Engineering Work

Port Billing Calculator

Port Billing Calculator ● LIVE — DAILY USE

Real-time advance wharfrent calculator so C&F agents can verify charges before committing, not after.

Port Billing Calculator interface — Car Wharfrent Bill form with live Quick Preview total
The Problem

The port's billing system creates permanent entries — there was no way for a C&F agent to estimate wharfrent charges before committing to them. That caused billing disputes, excessive cargo dwell time, and repeated trips to the counter just to check a number.

The Users

C&F agents at Mongla Port who need to know the expected charge before final submission, and — indirectly — the billing desk, which now fields fewer disputes over surprise totals.

The Constraints

Had to match the port authority's actual slab/VAT/levy rules exactly — a wrong estimate is worse than no estimate. No access to the port's internal billing database, since this is an advance estimator, not a system of record. Output had to be print-ready A4, because C&F agents still work from paper.

The System

Slab-based charge computation, VAT and levy calculation, inside/outside cargo split, hoisting charge auto-calculation, print-ready A4 output.

See It In Action
Screen recording of the Port Billing Calculator: entering C&F agent and BL details, then the live Quick Preview total jumping from Tk 1,292.15 to Tk 3,087.42 as the hoisting-charge rule auto-applies above 3 tons.
Live capture from portbill.pages.dev — the hoisting-charge business rule firing in real time
Business Rules
Cargo Info
Free Time
Storage Duration
Applicable Slab
Charge Calc
VAT / Levy
Additional Charges
Final Bill
Architecture
Browser
C&F agent's device
JS Business Logic
Runs entirely client-side — no backend
A4 Print Output
Technical Decisions

Plain JavaScript/HTML/CSS over a framework — the whole app is one calculation form, and a framework would add build tooling for no real benefit. Deployed as a static PWA on Cloudflare Pages: no hosting cost, works offline, matches how the billing desk actually operates.

Challenges

Getting the slab/VAT/levy math to match the port authority's real billing system exactly — any mismatch makes the estimate actively misleading to the agents relying on it, worse than not having the tool at all.

Result

In daily use by C&F agents at Mongla Port to verify expected charges before final submission — the evidence is that it's still running there today, not a one-time pilot.

What I Learned

A tool doesn't need a backend to be a real system its users depend on daily — client-side logic was enough because the estimate never needed to persist past the moment it's checked.

Checked by C&F agents an estimated 10–30+ times a day at the billing counter — a working estimate; no query logs are kept to cite an exact figure.