From 045a3660a3e58dfa961d1246311b3f5faae56169 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 28 Sep 2022 11:30:11 -0700 Subject: [PATCH 1/4] IO-2054 Updated labels for multi AR. --- bodyshop_translations.babel | 42 +++++++++++++++++++ .../pages/jobs-close/jobs-close.component.jsx | 12 +++++- client/src/translations/en_us/common.json | 2 + client/src/translations/es/common.json | 2 + client/src/translations/fr/common.json | 2 + 5 files changed, 58 insertions(+), 2 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index c905978c4..61ce03247 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -28335,6 +28335,27 @@ + + pimraryamountpayable + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + plitooltips @@ -35325,6 +35346,27 @@ + + external + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + findermodal false diff --git a/client/src/pages/jobs-close/jobs-close.component.jsx b/client/src/pages/jobs-close/jobs-close.component.jsx index 3df8aafc6..4f014a240 100644 --- a/client/src/pages/jobs-close/jobs-close.component.jsx +++ b/client/src/pages/jobs-close/jobs-close.component.jsx @@ -416,7 +416,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) { - ))} - - - - - ); - }} - - - {() => { - //Perform Calculation to determine discrepancy. - let totalAllocated = Dinero(); + + ); + }} + + + + + {() => { + //Perform Calculation to determine discrepancy. + let totalAllocated = Dinero(); - const payers = form.getFieldValue("qb_multiple_payers"); - payers && - payers.forEach((payer) => { - totalAllocated = totalAllocated.add( - Dinero({ amount: Math.round((payer?.amount || 0) * 100) }) - ); - }); - const discrep = job.job_totals - ? Dinero(job.job_totals.totals.total_repairs).subtract( - totalAllocated - ) - : Dinero(); - return ( - - - - - - - - = - 0 ? "green" : "red", - }} - value={discrep.toFormat()} - /> - - ); - }} - - + const payers = form.getFieldValue("qb_multiple_payers"); + payers && + payers.forEach((payer) => { + totalAllocated = totalAllocated.add( + Dinero({ + amount: Math.round((payer?.amount || 0) * 100), + }) + ); + }); + const discrep = job.job_totals + ? Dinero(job.job_totals.totals.total_repairs).subtract( + totalAllocated + ) + : Dinero(); + return ( + + + + + - + + = + 0 ? "green" : "red", + }} + value={discrep.toFormat()} + /> + + ); + }} + + + )}