From be5501f55c1de9842152c2c76d0d830caed07a27 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 29 Apr 2021 16:40:11 -0700 Subject: [PATCH] IO-972 Parts & Sublet screen helpers. --- bodyshop_translations.babel | 215 +++++++++++++++++ .../job-bills-total.component.jsx | 220 +++++++++++++----- .../jobs-detail-rates.parts.component.jsx | 4 +- client/src/translations/en_us/common.json | 20 +- client/src/translations/es/common.json | 12 + client/src/translations/fr/common.json | 12 + 6 files changed, 418 insertions(+), 65 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index b02d06147..c2ecd9f56 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -21733,6 +21733,200 @@ + + plitooltips + + + billtotal + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + creditmemos + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + creditsnotreceived + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + discrep1 + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + discrep2 + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + discrep3 + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + laboradj + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + partstotal + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + totalreturns + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + rates false @@ -22011,6 +22205,27 @@ + + returntotals + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + rosaletotal false 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 3fd5e8c12..81fcd5e9e 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 @@ -1,4 +1,4 @@ -import { Card, Space, Statistic } from "antd"; +import { Card, Col, Row, Space, Statistic, Tooltip, Typography } from "antd"; import Dinero from "dinero.js"; import React from "react"; import { useTranslation } from "react-i18next"; @@ -50,7 +50,7 @@ export default function JobBillsTotalComponent({ } else { billCms = billCms.add( Dinero({ - amount: Math.round((il.actual_price || 0) * -100), + amount: Math.round((il.actual_price || 0) * 100), }).multiply(il.quantity) ); } @@ -73,64 +73,166 @@ export default function JobBillsTotalComponent({ const discrepWithLbrAdj = discrepancy.add(lbrAdjustments); - const discrepWithCms = discrepWithLbrAdj.subtract(billCms); + const discrepWithCms = discrepWithLbrAdj.add(billCms); const creditsNotReceived = totalReturns.add(billCms); //billCms is tracked as a negative number. return ( - - - - - - - - - - - - - - + + + + + + } + > + + + - + + } + > + + + = + + } + > + + + + + + } + > + + + = + + } + > + + + + + + } + > + + + = + + } + > + + + + + + + + + + } + > + + + + } + > + + + + + + ); } diff --git a/client/src/components/jobs-detail-rates/jobs-detail-rates.parts.component.jsx b/client/src/components/jobs-detail-rates/jobs-detail-rates.parts.component.jsx index 6ecbf0657..24dd57b34 100644 --- a/client/src/components/jobs-detail-rates/jobs-detail-rates.parts.component.jsx +++ b/client/src/components/jobs-detail-rates/jobs-detail-rates.parts.component.jsx @@ -319,7 +319,7 @@ export function JobsDetailRatesParts({ ); }} - {" "} + - {" "} +
\n\n
    \n
  • Too many bills/bill lines that have been posted against this RO. Check to make sure every bill posted on this RO is correctly posted and assigned.
  • \n
  • You do not have the latest supplement imported, or, a supplement must be submitted and then imported.
  • \n
  • You have posted a bill line to labor.
  • \n
\n
\nThere may be additional issues not listed above that prevent this job from reconciling.", + "discrep2": "If the discrepancy is not $0, you may have one of the following:

\n\n
    \n
  • Used an incorrect rate when deducting from labor.
  • \n
  • An outstanding imbalance higher in the reconciliation process.
  • \n
\n
\nThere may be additional issues not listed above that prevent this job from reconciling.", + "discrep3": "If the discrepancy is not $0, you may have one of the following:

\n\n
    \n
  • Credit memos that have not been received or posted.
  • \n
  • An outstanding imbalance higher in the reconciliation process.
  • \n
\n
\nThere may be additional issues not listed above that prevent this job from reconciling.", + "laboradj": "The sum of all bill lines that deducted from labor hours, rather than part prices.", + "partstotal": "This is the total of all parts and sublet amounts on the vehicle (some of these may require an in-house invoice).
\nItems such as shop and paint materials, labor online lines, etc. are not included in this total.", + "totalreturns": "The total amount of returns created for this job." + }, "rates": "Rates", "rates_subtotal": "All Rates Subtotal", "reconciliation": { @@ -1308,7 +1319,8 @@ "removedpartsstrikethrough": "Strike through lines represent parts that have been removed from the estimate. They are included for completeness of reconciliation." }, "reconciliationheader": "Parts & Sublet Reconciliation", - "rosaletotal": "Total RO Sale", + "returntotals": "Return Totals", + "rosaletotal": "RO Parts Total", "sale_labor": "Sales - Labor", "sale_parts": "Sales - Parts & Sublet", "sales": "Sales", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index fc9798503..1a224a0ea 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1293,6 +1293,17 @@ "partsfilter": "", "partssubletstotal": "", "partstotal": "", + "plitooltips": { + "billtotal": "", + "creditmemos": "", + "creditsnotreceived": "", + "discrep1": "", + "discrep2": "", + "discrep3": "", + "laboradj": "", + "partstotal": "", + "totalreturns": "" + }, "rates": "Tarifas", "rates_subtotal": "", "reconciliation": { @@ -1308,6 +1319,7 @@ "removedpartsstrikethrough": "" }, "reconciliationheader": "", + "returntotals": "", "rosaletotal": "", "sale_labor": "", "sale_parts": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 2b8c8f63e..b234d8486 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1293,6 +1293,17 @@ "partsfilter": "", "partssubletstotal": "", "partstotal": "", + "plitooltips": { + "billtotal": "", + "creditmemos": "", + "creditsnotreceived": "", + "discrep1": "", + "discrep2": "", + "discrep3": "", + "laboradj": "", + "partstotal": "", + "totalreturns": "" + }, "rates": "Les taux", "rates_subtotal": "", "reconciliation": { @@ -1308,6 +1319,7 @@ "removedpartsstrikethrough": "" }, "reconciliationheader": "", + "returntotals": "", "rosaletotal": "", "sale_labor": "", "sale_parts": "",