From f4bcad1b0687a4529afafc03c5f2f0bbd56740e2 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 26 Oct 2023 16:11:47 -0700 Subject: [PATCH] IO-2425 US Reconcilliation for Non-Parts that have Misc amt Non-part lines that had a Misc_amt where missing from reconciliation also remove any part that didn't have a act_price > 0 and a qty > 0 --- .../components/job-bills-total/job-bills-total.component.jsx | 3 ++- .../job-reconciliation-modal.component.jsx | 3 ++- client/src/graphql/jobs.queries.js | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/components/job-bills-total/job-bills-total.component.jsx b/client/src/components/job-bills-total/job-bills-total.component.jsx index 701ebe1c6..45f820630 100644 --- a/client/src/components/job-bills-total/job-bills-total.component.jsx +++ b/client/src/components/job-bills-total/job-bills-total.component.jsx @@ -87,7 +87,8 @@ export default function JobBillsTotalComponent({ const totalPartsSublet = Dinero(totals.parts.parts.total) .add(Dinero(totals.parts.sublets.total)) .add(Dinero(totals.additional.shipping)) - .add(Dinero(totals.additional.towing)); + .add(Dinero(totals.additional.towing)) + .add(Dinero(totals.additional.additionalCosts)); const discrepancy = totalPartsSublet.subtract(billTotals); diff --git a/client/src/components/job-reconciliation-modal/job-reconciliation-modal.component.jsx b/client/src/components/job-reconciliation-modal/job-reconciliation-modal.component.jsx index 8c83a504a..0a2f970a3 100644 --- a/client/src/components/job-reconciliation-modal/job-reconciliation-modal.component.jsx +++ b/client/src/components/job-reconciliation-modal/job-reconciliation-modal.component.jsx @@ -19,7 +19,8 @@ export default function JobReconciliationModalComponent({ job, bills }) { const jobLineData = job.joblines.filter( (j) => - (j.part_type !== null && j.part_type !== "PAE") || + (j.part_type !== "PAE" && j.act_price !== 0 && j.part_qty !== 0) || + j.misc_amt !== 0 || (j.line_desc && j.line_desc.toLowerCase().includes("towing") && j.lbr_op === "OP13") || diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index 4d656858f..f3a3966a4 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -850,6 +850,7 @@ export const GET_JOB_RECONCILIATION_BY_PK = gql` tax_part db_ref manual_line + misc_amt } } }