One pricing calculator for the app and the customer page

The customer-facing page calls the same serviceLineTotal function the app uses, so the two can never disagree about a line's price.

What it is

A one-line delegation to the shared service catalog calculator instead of a re-implementation of the arithmetic on the portal page.

Also called: quote total does not match · line item maths wrong · quantity times rate

See it
One pricing calculator for the app and the customer page
Day rate
$500
Days figured
11
Crew size
3
Fuel & equipment
$300
Finished 2 days early — $1,800 back to the crew
Before and after of a service row: $1,811 versus 3 x $1,811 = $5,433. Logic in src/lib/serviceCatalog.ts. Sample data — no customer information appears here.
How it works
  1. 1svcLineTotal delegates to serviceCatalog.serviceLineTotal
  2. 2The visible services subtotal sums those results and rounds to cents
  3. 3The same helpers supply the measurement and unit-price labels
Why we built it

The customer-facing page carried its own copy of the pricing arithmetic, and it drifted the moment custom lines gained a quantity: the office billed 3 x $1,811 = $5,433 while the customer's page quietly printed $1,811 and under-added the subtotal by $3,622. One calculator now produces both numbers. A total a customer reads is never computed by a second paraphrase of the real formula.

The problem
  • Two implementations of the same price maths drifting apart
Sound familiar?
What you get
The number the customer sees is the number the builder billed, by construction

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →