IO-3001 Reverse n_ttl and g_ttl logic for audatex estimates.

This commit is contained in:
Patrick Fic
2024-11-20 12:43:03 -08:00
parent 2304e0bf02
commit f2d9626888

View File

@@ -71,8 +71,8 @@ async function TotalsServerSide(req, res) {
// Sub total scrubbbing.
const emsTotal =
job.cieca_ttl.data.n_ttl_amt === job.cieca_ttl.data.g_ttl_amt //It looks like sometimes, gross and net are the same, but they shouldn't be.
? job.cieca_ttl.data.g_ttl_amt - job.cieca_ttl.data.g_tax //If they are, adjust the gross total down by the tax amount.
: job.cieca_ttl.data.n_ttl_amt - job.cieca_ttl.data.g_tax;
? job.cieca_ttl.data.n_ttl_amt - job.cieca_ttl.data.g_tax
: job.cieca_ttl.data.g_ttl_amt - job.cieca_ttl.data.g_tax; //If they are, adjust the gross total down by the tax amount.
const ttlDifference = emsTotal - ret.totals.subtotal.getAmount() / 100;
if (Math.abs(ttlDifference) > 0.0) {