From f2d96268889e53b6d8a5d2fdf7a8d745f5a0574f Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 20 Nov 2024 12:43:03 -0800 Subject: [PATCH] IO-3001 Reverse n_ttl and g_ttl logic for audatex estimates. --- server/job/job-totals-USA.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/job/job-totals-USA.js b/server/job/job-totals-USA.js index 2ebf5910f..0b2c530af 100644 --- a/server/job/job-totals-USA.js +++ b/server/job/job-totals-USA.js @@ -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) {