feature/Reynolds-and-Reynolds-DMS-API-Integration - Add dealer id / merge fortellis

This commit is contained in:
Dave
2025-09-12 14:59:42 -04:00
parent 2fec9fd16e
commit 7c8260685e
37 changed files with 124 additions and 83 deletions

View File

@@ -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({
<Select.Option key={item.cost_center}>
{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}
</Select.Option>