From 87d2618020fd1ddb18ab066f74a5f2885faa06e2 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Tue, 8 Jun 2021 15:41:24 -0700 Subject: [PATCH] Add rounding for depreciation. --- server/job/job-totals.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/job/job-totals.js b/server/job/job-totals.js index ee9d76aca..598688ca8 100644 --- a/server/job/job-totals.js +++ b/server/job/job-totals.js @@ -432,16 +432,18 @@ function CalculateTaxesTotals(job, otherTotals) { ); ret.custPayable = { - deductible: Dinero({ amount: (job.ded_amt || 0) * 100 }) || 0, + deductible: Dinero({ amount: Math.round((job.ded_amt || 0) * 100) }) || 0, federal_tax: job.ca_gst_registrant ? job.ca_customer_gst === 0 || job.ca_customer_gst === null ? ret.federal_tax : Dinero({ amount: Math.round(job.ca_customer_gst * 100) }) : Dinero(), other_customer_amount: Dinero({ - amount: (job.other_amount_payable || 0) * 100, + amount: Math.round((job.other_amount_payable || 0) * 100), + }), + dep_taxes: Dinero({ + amount: Math.round((job.depreciation_taxes || 0) * 100), }), - dep_taxes: Dinero({ amount: (job.depreciation_taxes || 0) * 100 }), }; ret.custPayable.total = ret.custPayable.deductible