From df0f98f3774fd9be2a31ad394a430f3d18b68388 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 19 Aug 2020 15:20:12 -0700 Subject: [PATCH] Added part type totals BOD-260 --- .../job-totals-table/job-totals-table.component.jsx | 9 +++++++++ .../components/job-totals-table/job-totals.utility.js | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/src/components/job-totals-table/job-totals-table.component.jsx b/client/src/components/job-totals-table/job-totals-table.component.jsx index b8655de2b..48a30c0d4 100644 --- a/client/src/components/job-totals-table/job-totals-table.component.jsx +++ b/client/src/components/job-totals-table/job-totals-table.component.jsx @@ -189,6 +189,15 @@ export function JobsTotalsTableComponent({ bodyshop, job }) {
| {t(`jobs.fields.${key.toLowerCase()}`)} | ++ {totals.parts.parts.list[key].total.toFormat()} + | ++ |
| {t("jobs.labels.partstotal")} | diff --git a/client/src/components/job-totals-table/job-totals.utility.js b/client/src/components/job-totals-table/job-totals.utility.js index 7903abd0e..5688e92fa 100644 --- a/client/src/components/job-totals-table/job-totals.utility.js +++ b/client/src/components/job-totals-table/job-totals.utility.js @@ -36,8 +36,6 @@ function CalculateTaxesTotals(job, otherTotals) { return acc; } }, Dinero({ amount: 0 })); - console.log("job.federal_tax_rate ", job.federal_tax_rate); - console.log(subtotal.percentage((job.federal_tax_rate || 0) * 100)); let ret = { subtotal: subtotal, federal_tax: subtotal.percentage((job.federal_tax_rate || 0) * 100), @@ -242,6 +240,7 @@ function CalculatePartsTotals(jobLines) { // case "PAP": // case "PAR": default: + if (value.part_type === null) return acc; return { ...acc, parts: { |