From 7c8260685e5613a2216ba079c25c4eb2f5fd2a0d Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 12 Sep 2025 14:59:42 -0400 Subject: [PATCH] feature/Reynolds-and-Reynolds-DMS-API-Integration - Add dealer id / merge fortellis --- ...accounting-receivables-table.component.jsx | 4 +-- ...form-lines.extended.formitem.component.jsx | 4 +-- .../bill-form/bill-form.component.jsx | 2 +- .../bill-form/bill-form.lines.component.jsx | 4 +-- .../dms-post-form/dms-post-form.component.jsx | 14 +++++----- .../header/buildAccountingChildren.jsx | 4 +-- .../jobs-close-auto-allocate.component.jsx | 4 +-- .../jobs-close-export-button.component.jsx | 2 +- .../jobs-detail-header.component.jsx | 2 +- .../labor-allocations-table.utility.js | 2 +- .../partner-ping/partner-ping.component.jsx | 1 + ...arts-order-list-table-drawer.component.jsx | 2 +- .../parts-order-list-table.component.jsx | 2 +- .../shop-employees-form.component.jsx | 5 +++- ...p-info.responsibilitycenters.component.jsx | 20 +++++++------- ....responsibilitycenters.taxes.component.jsx | 2 +- .../tech-job-clock-in-form.component.jsx | 5 +++- .../tech-job-clock-in-form.container.jsx | 5 +++- .../tech-job-clock-out-button.component.jsx | 11 +++++--- .../time-ticket-modal.component.jsx | 9 +++++-- .../time-ticket-modal.container.jsx | 5 +++- client/src/graphql/bodyshop.queries.js | 2 ++ .../accounting-payables.container.jsx | 5 +++- .../accounting-payments.container.jsx | 5 +++- .../accounting-receivables.container.jsx | 5 +++- .../dms-payables/dms-payables.container.jsx | 7 ----- client/src/pages/dms/dms.container.jsx | 9 +------ .../pages/jobs-close/jobs-close.component.jsx | 8 +++--- client/src/utils/determineDMSType.js | 11 ++++++++ package-lock.json | 27 ++++++++++++------- server.js | 3 +-- server/data/autohouse.js | 2 +- server/data/claimscorp.js | 2 +- server/data/kaizen.js | 2 +- server/graphql-client/queries.js | 5 ++++ .../partsManagement/defaultNewShop.json | 1 + server/job/job-costing.js | 4 +-- 37 files changed, 124 insertions(+), 83 deletions(-) diff --git a/client/src/components/accounting-receivables-table/accounting-receivables-table.component.jsx b/client/src/components/accounting-receivables-table/accounting-receivables-table.component.jsx index 7775fbb8f..656be994d 100644 --- a/client/src/components/accounting-receivables-table/accounting-receivables-table.component.jsx +++ b/client/src/components/accounting-receivables-table/accounting-receivables-table.component.jsx @@ -171,7 +171,7 @@ export function AccountingReceivablesTableComponent({ bodyshop, loading, jobs, r - {!bodyshop.cdk_dealerid && !bodyshop.pbs_serialnumber && ( + {!bodyshop.cdk_dealerid && !bodyshop.pbs_serialnumber && !bodyshop.rr_dealerid && ( <> )} - {bodyshop.accountingconfig && bodyshop.accountingconfig.qbo && } + {bodyshop.accountingconfig?.qbo && } diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index c0f209205..c15866838 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -354,7 +354,7 @@ export function BillFormComponent({ - {bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid ? ( + {bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid || bodyshop.rr_dealerid ? ( diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx index 994169302..ca6a7fd2a 100644 --- a/client/src/components/bill-form/bill-form.lines.component.jsx +++ b/client/src/components/bill-form/bill-form.lines.component.jsx @@ -90,7 +90,7 @@ export function BillEnterModalLinesComponent({ actual_price: opt.cost, original_actual_price: opt.cost, cost_center: opt.part_type - ? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid + ? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid || bodyshop.rr_dealerid ? opt.part_type !== "PAE" ? opt.part_type : null @@ -322,7 +322,7 @@ export function BillEnterModalLinesComponent({ }, formInput: () => ( diff --git a/client/src/components/dms-post-form/dms-post-form.component.jsx b/client/src/components/dms-post-form/dms-post-form.component.jsx index c9faa4d98..52121b024 100644 --- a/client/src/components/dms-post-form/dms-post-form.component.jsx +++ b/client/src/components/dms-post-form/dms-post-form.component.jsx @@ -17,7 +17,7 @@ import Dinero from "dinero.js"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { determineDmsType } from "../../pages/dms/dms.container"; +import { determineDmsType } from "../../utils/determineDMSType"; import { selectBodyshop } from "../../redux/user/user.selectors"; import i18n from "../../translations/i18n"; import dayjs from "../../utils/day"; @@ -257,8 +257,7 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) { ]} > */} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( )} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( <> @@ -3790,7 +3790,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { > - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( */} {/* */} {/* */} - {/* {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (*/} + {/* {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && (*/} {/* Adjustments} id="refund"> - {bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber ? ( + {bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid ? ( <> - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( {item.cost_center === "timetickets.labels.shift" ? t(item.cost_center) - : bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === "on" + : bodyshop.cdk_dealerid || + bodyshop.pbs_serialnumber || + bodyshop.rr_dealerid || + Enhanced_Payroll.treatment === "on" ? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`) : item.cost_center} diff --git a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx index f1915c6bd..1641c097d 100644 --- a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx +++ b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx @@ -75,7 +75,10 @@ export function TechClockInContainer({ setTimeTicketContext, technician, bodysho jobid: values.jobid, cost_center: values.cost_center, ciecacode: - bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === "on" + bodyshop.cdk_dealerid || + bodyshop.pbs_serialnumber || + bodyshop.rr_dealerid || + Enhanced_Payroll.treatment === "on" ? values.cost_center : Object.keys(bodyshop.md_responsibility_centers.defaults.costs).find((key) => { return bodyshop.md_responsibility_centers.defaults.costs[key] === values.cost_center; diff --git a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx index ed48ecff5..69e43d4c6 100644 --- a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx +++ b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx @@ -69,7 +69,10 @@ export function TechClockOffButton({ rate: emps && emps.rates.filter((r) => r.cost_center === values.cost_center)[0]?.rate, flat_rate: emps && emps.flat_rate, ciecacode: - bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === "on" + bodyshop.cdk_dealerid || + bodyshop.pbs_serialnumber || + bodyshop.rr_dealerid || + Enhanced_Payroll.treatment === "on" ? values.cost_center : Object.keys(bodyshop.md_responsibility_centers.defaults.costs).find((key) => { return bodyshop.md_responsibility_centers.defaults.costs[key] === values.cost_center; @@ -165,7 +168,9 @@ export function TechClockOffButton({ ); const fieldTypeToCheck = - bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber ? "mod_lbr_ty" : "cost_center"; + bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid + ? "mod_lbr_ty" + : "cost_center"; const costCenterDiff = Math.round( @@ -205,7 +210,7 @@ export function TechClockOffButton({ {item.cost_center === "timetickets.labels.shift" ? t(item.cost_center) - : bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber + : bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid ? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`) : item.cost_center} diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx index 2b5b2273e..388e08590 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx @@ -60,7 +60,10 @@ export function TimeTicketModalComponent({ {item.cost_center === "timetickets.labels.shift" ? t(item.cost_center) - : bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === "on" + : bodyshop.cdk_dealerid || + bodyshop.pbs_serialnumber || + bodyshop.rr_dealerid || + Enhanced_Payroll.treatment === "on" ? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`) : item.cost_center} @@ -187,7 +190,9 @@ export function TimeTicketModalComponent({ ); const fieldTypeToCheck = - bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber ? "mod_lbr_ty" : "cost_center"; + bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid + ? "mod_lbr_ty" + : "cost_center"; const costCenterDiff = Math.round( diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx index 86a037165..8ecb4c2b5 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx @@ -137,7 +137,10 @@ export function TimeTicketModalContainer({ timeTicketModal, toggleModalVisible, if (!!changedFields.cost_center && !!EmployeeAutoCompleteData) { form.setFieldsValue({ ciecacode: - bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === "on" + bodyshop.cdk_dealerid || + bodyshop.pbs_serialnumber || + bodyshop.rr_dealerid || + Enhanced_Payroll.treatment === "on" ? changedFields.cost_center : Object.keys(bodyshop.md_responsibility_centers.defaults.costs).find( (key) => bodyshop.md_responsibility_centers.defaults.costs[key] === changedFields.cost_center diff --git a/client/src/graphql/bodyshop.queries.js b/client/src/graphql/bodyshop.queries.js index cdb806e55..9635cab40 100644 --- a/client/src/graphql/bodyshop.queries.js +++ b/client/src/graphql/bodyshop.queries.js @@ -111,6 +111,7 @@ export const QUERY_BODYSHOP = gql` jc_hourly_rates md_jobline_presets cdk_dealerid + rr_dealerid features attach_pdf_to_email tt_allow_post_to_invoiced @@ -245,6 +246,7 @@ export const UPDATE_SHOP = gql` jc_hourly_rates md_jobline_presets cdk_dealerid + rr_dealerid attach_pdf_to_email tt_allow_post_to_invoiced cdk_configuration diff --git a/client/src/pages/accounting-payables/accounting-payables.container.jsx b/client/src/pages/accounting-payables/accounting-payables.container.jsx index a1b044e9f..3104c84af 100644 --- a/client/src/pages/accounting-payables/accounting-payables.container.jsx +++ b/client/src/pages/accounting-payables/accounting-payables.container.jsx @@ -55,7 +55,10 @@ export function AccountingPayablesContainer({ bodyshop, setBreadcrumbs, setSelec const noPath = !partnerVersion?.qbpath && - !(bodyshop && (bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.accountingconfig.qbo)); + !( + bodyshop && + (bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid || bodyshop.accountingconfig.qbo) + ); return (
diff --git a/client/src/pages/accounting-payments/accounting-payments.container.jsx b/client/src/pages/accounting-payments/accounting-payments.container.jsx index ef9991025..cea80853f 100644 --- a/client/src/pages/accounting-payments/accounting-payments.container.jsx +++ b/client/src/pages/accounting-payments/accounting-payments.container.jsx @@ -54,7 +54,10 @@ export function AccountingPaymentsContainer({ bodyshop, setBreadcrumbs, setSelec if (error) return ; const noPath = !partnerVersion?.qbpath && - !(bodyshop && (bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.accountingconfig.qbo)); + !( + bodyshop && + (bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid || bodyshop.accountingconfig.qbo) + ); return (
diff --git a/client/src/pages/dms-payables/dms-payables.container.jsx b/client/src/pages/dms-payables/dms-payables.container.jsx index ad51b938b..c49b0985f 100644 --- a/client/src/pages/dms-payables/dms-payables.container.jsx +++ b/client/src/pages/dms-payables/dms-payables.container.jsx @@ -146,10 +146,3 @@ export function DmsContainer({ setBreadcrumbs, setSelectedHeader }) { ); } - -export const determineDmsType = (bodyshop) => { - if (bodyshop.cdk_dealerid) return "cdk"; - else { - return "pbs"; - } -}; diff --git a/client/src/pages/dms/dms.container.jsx b/client/src/pages/dms/dms.container.jsx index 977c276a3..7b68952a7 100644 --- a/client/src/pages/dms/dms.container.jsx +++ b/client/src/pages/dms/dms.container.jsx @@ -168,7 +168,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse if (loading) return ; if (error) return ; - if (!jobId || !(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) || !(data && data.jobs_by_pk)) + if (!jobId || !(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) || bodyshop.rr_dealerid || !data?.jobs_by_pk) return ; if (data.jobs_by_pk && data.jobs_by_pk.date_exported) @@ -242,10 +242,3 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
); } - -export const determineDmsType = (bodyshop) => { - if (bodyshop.cdk_dealerid) return "cdk"; - else { - return "pbs"; - } -}; diff --git a/client/src/pages/jobs-close/jobs-close.component.jsx b/client/src/pages/jobs-close/jobs-close.component.jsx index 2423e2e6b..043e0677a 100644 --- a/client/src/pages/jobs-close/jobs-close.component.jsx +++ b/client/src/pages/jobs-close/jobs-close.component.jsx @@ -189,7 +189,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set {t("general.actions.close")} - {(bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid) && ( + {(bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid || bodyshop.rr_dealerid) && ( @@ -309,7 +309,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set )} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( )} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( )} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid) && ( { + const dmsMapping = { + cdk_dealerid: "cdk", + pbs_serialnumber: "pbs", + rr_dealerid: "rr" + }; + + return Object.keys(dmsMapping).find((key) => bodyshop[key]) + ? dmsMapping[Object.keys(dmsMapping).find((key) => bodyshop[key])] + : "pbs"; +}; diff --git a/package-lock.json b/package-lock.json index 0503e0b39..319e64634 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,20 +9,21 @@ "version": "0.2.0", "license": "UNLICENSED", "dependencies": { - "@aws-sdk/client-cloudwatch-logs": "^3.887.0", - "@aws-sdk/client-elasticache": "^3.887.0", - "@aws-sdk/client-s3": "^3.887.0", - "@aws-sdk/client-secrets-manager": "^3.887.0", - "@aws-sdk/client-ses": "^3.887.0", - "@aws-sdk/credential-provider-node": "^3.887.0", - "@aws-sdk/lib-storage": "^3.887.0", - "@aws-sdk/s3-request-presigner": "^3.887.0", + "@aws-sdk/client-cloudwatch-logs": "^3.882.0", + "@aws-sdk/client-elasticache": "^3.882.0", + "@aws-sdk/client-s3": "^3.882.0", + "@aws-sdk/client-secrets-manager": "^3.882.0", + "@aws-sdk/client-ses": "^3.882.0", + "@aws-sdk/credential-provider-node": "^3.882.0", + "@aws-sdk/lib-storage": "^3.882.0", + "@aws-sdk/s3-request-presigner": "^3.882.0", "@opensearch-project/opensearch": "^2.13.0", "@socket.io/admin-ui": "^0.5.1", "@socket.io/redis-adapter": "^8.3.0", "archiver": "^7.0.1", "aws4": "^1.13.2", - "axios": "^1.12.1", + "axios": "^1.11.0", + "axios-curlirize": "^2.0.0", "better-queue": "^3.8.12", "bullmq": "^5.58.5", "chart.js": "^4.5.0", @@ -31,7 +32,7 @@ "cookie-parser": "^1.4.7", "cors": "^2.8.5", "crisp-status-reporter": "^1.2.2", - "dd-trace": "^5.67.0", + "dd-trace": "^5.65.0", "dinero.js": "^1.9.1", "dotenv": "^17.2.2", "express": "^4.21.1", @@ -3783,6 +3784,12 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/axios-curlirize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/axios-curlirize/-/axios-curlirize-2.0.0.tgz", + "integrity": "sha512-TrQBa8MfIwaYsrCoYhfCr7NDRXLuGm+Rqh/PtAuO64b8PCCOJWn37BWQvpN4/mzzig3uHb4qXzvpxJmALHaiwA==", + "license": "MIT" + }, "node_modules/axios-ntlm": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.4.4.tgz", diff --git a/server.js b/server.js index 1ddf2201a..4751d7d00 100644 --- a/server.js +++ b/server.js @@ -325,7 +325,7 @@ const applySocketIO = async ({ server, app }) => { }); // Legacy Socket Events - SetLegacyWebsocketHandlers(io) + SetLegacyWebsocketHandlers(io); const api = { pubClient, @@ -390,7 +390,6 @@ const main = async () => { const redisHelpers = applyRedisHelpers({ pubClient, app, logger }); const ioHelpers = applyIOHelpers({ app, redisHelpers, ioRedis, logger }); - // Initialize Queues await loadQueues({ pubClient: pubClient, logger, redisHelpers, ioRedis }); diff --git a/server/data/autohouse.js b/server/data/autohouse.js index d050158ef..19138c5c0 100644 --- a/server/data/autohouse.js +++ b/server/data/autohouse.js @@ -736,7 +736,7 @@ const CreateCosts = (job) => { PASL: "PASL" }; const defaultCosts = - job.bodyshop.cdk_dealerid || job.bodyshop.pbs_serialnumber + job.bodyshop.cdk_dealerid || job.bodyshop.pbs_serialnumber || job.bodyshop.rr_dealerid ? ciecaObj : job.bodyshop.md_responsibility_centers.defaults.costs; diff --git a/server/data/claimscorp.js b/server/data/claimscorp.js index d5700c866..f60fbdbeb 100644 --- a/server/data/claimscorp.js +++ b/server/data/claimscorp.js @@ -591,7 +591,7 @@ const CreateCosts = (job) => { PASL: "PASL" }; const defaultCosts = - job.bodyshop.cdk_dealerid || job.bodyshop.pbs_serialnumber + job.bodyshop.cdk_dealerid || job.bodyshop.pbs_serialnumber || job.bodyshop.rr_dealerid ? ciecaObj : job.bodyshop.md_responsibility_centers.defaults.costs; diff --git a/server/data/kaizen.js b/server/data/kaizen.js index 86068c1ea..7bdccdac1 100644 --- a/server/data/kaizen.js +++ b/server/data/kaizen.js @@ -557,7 +557,7 @@ const CreateCosts = (job) => { PASL: "PASL" }; const defaultCosts = - job.bodyshop.cdk_dealerid || job.bodyshop.pbs_serialnumber + job.bodyshop.cdk_dealerid || job.bodyshop.pbs_serialnumber || job.bodyshop.rr_dealerid ? ciecaObj : job.bodyshop.md_responsibility_centers.defaults.costs; diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js index 26bbd70fd..8c23b8de0 100644 --- a/server/graphql-client/queries.js +++ b/server/graphql-client/queries.js @@ -695,6 +695,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop jc_hourly_rates cdk_dealerid pbs_serialnumber + rr_dealerid use_paint_scale_data timezone } @@ -932,6 +933,7 @@ exports.CLAIMSCORP_QUERY = `query CLAIMSCORP_EXPORT($start: timestamptz, $bodysh jc_hourly_rates cdk_dealerid pbs_serialnumber + rr_dealerid use_paint_scale_data timezone } @@ -1193,6 +1195,7 @@ exports.KAIZEN_QUERY = `query KAIZEN_EXPORT($start: timestamptz, $bodyshopid: uu jc_hourly_rates cdk_dealerid pbs_serialnumber + rr_dealerid use_paint_scale_data timezone } @@ -1695,6 +1698,7 @@ query QUERY_JOB_COSTING_DETAILS($id: uuid!) { jc_hourly_rates cdk_dealerid pbs_serialnumber + rr_dealerid use_paint_scale_data } } @@ -1811,6 +1815,7 @@ exports.QUERY_JOB_COSTING_DETAILS_MULTI = ` query QUERY_JOB_COSTING_DETAILS_MULT jc_hourly_rates cdk_dealerid pbs_serialnumber + rr_dealerid use_paint_scale_data } } diff --git a/server/integrations/partsManagement/defaultNewShop.json b/server/integrations/partsManagement/defaultNewShop.json index d6e702383..e38b20d45 100644 --- a/server/integrations/partsManagement/defaultNewShop.json +++ b/server/integrations/partsManagement/defaultNewShop.json @@ -1224,6 +1224,7 @@ } ], "cdk_dealerid": null, + "rr_dealerid": null, "features": { "allAccess": true, "singleDeviceOnly": false diff --git a/server/job/job-costing.js b/server/job/job-costing.js index d1fe8b3d7..9eadab5fe 100644 --- a/server/job/job-costing.js +++ b/server/job/job-costing.js @@ -601,7 +601,7 @@ function GenerateCostingData(job) { //At the bill level. bill_val.billlines.map((line_val) => { //At the bill line level. - if (job.bodyshop.pbs_serialnumber || job.bodyshop.cdk_dealerid) { + if (job.bodyshop.pbs_serialnumber || job.bodyshop.cdk_dealerid || job.bodyshop.rr_dealerid) { if (!bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]]) bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]] = Dinero(); @@ -716,7 +716,7 @@ function GenerateCostingData(job) { const ticketTotalsByCostCenter = job.timetickets.reduce((ticket_acc, ticket_val) => { //At the invoice level. - if (job.bodyshop.pbs_serialnumber || job.bodyshop.cdk_dealerid) { + if (job.bodyshop.pbs_serialnumber || job.bodyshop.cdk_dealerid || job.bodyshop.rr_dealerid) { if (!ticket_acc[selectedDmsAllocationConfig.costs[ticket_val.ciecacode]]) ticket_acc[selectedDmsAllocationConfig.costs[ticket_val.ciecacode]] = Dinero();