ComputeInvoiceTotals splits the line set in two: taxable subtotal (estimate, manual and adjustment rows) and gross subtotal (change_order rows). Invoice tax applies only to the taxable half; the change-order half is added post-tax.
Also called: double tax · tax on change orders · invoice tax calculation
- 1Each line's total is quantity × unit_price.
- 2kind === 'change_order' accumulates into grossSubtotal; everything else into taxableSubtotal.
- 3tax_amount = taxableSubtotal × taxPct; total = both subtotals + tax; balance = total − paid_amount.
- 4Everything rounds to cents at the end, once.
A change order works out its own subtotal, markup and tax before anyone sees it, so the figure the customer approved is already a finished number. Running the invoice's tax rate over that figure again charged the customer tax on tax. Change order lines are now added after tax is calculated, at exactly the amount that was signed for.
- Tax being applied twice to a change-order amount.
- Invoice totals disagreeing with the signed change order.
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 →