IO-1727 Skip posting contact and vehicle for PBS..
This commit is contained in:
@@ -3872,6 +3872,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>disablecontactvehiclecreation</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>dms_acctnumber</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -129,6 +129,15 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
{bodyshop.pbs_serialnumber && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.disablecontactvehiclecreation")}
|
||||
valuePropName="checked"
|
||||
name={["pbs_configuration", "disablecontactvehicle"]}
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
)}
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow header={t("bodyshop.labels.dms.cdk.payers")}>
|
||||
<Form.List name={["cdk_configuration", "payers"]}>
|
||||
|
||||
@@ -246,6 +246,7 @@
|
||||
"dms": {
|
||||
"cashierid": "Cashier ID",
|
||||
"default_journal": "Default Journal",
|
||||
"disablecontactvehiclecreation": "Disable Contact & Vehicle Updates/Creation",
|
||||
"dms_acctnumber": "DMS Account #",
|
||||
"dms_wip_acctnumber": "DMS W.I.P. Account #",
|
||||
"generic_customer_number": "Generic Customer Number",
|
||||
|
||||
@@ -246,6 +246,7 @@
|
||||
"dms": {
|
||||
"cashierid": "",
|
||||
"default_journal": "",
|
||||
"disablecontactvehiclecreation": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_wip_acctnumber": "",
|
||||
"generic_customer_number": "",
|
||||
|
||||
@@ -246,6 +246,7 @@
|
||||
"dms": {
|
||||
"cashierid": "",
|
||||
"default_journal": "",
|
||||
"disablecontactvehiclecreation": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_wip_acctnumber": "",
|
||||
"generic_customer_number": "",
|
||||
|
||||
@@ -928,6 +928,7 @@
|
||||
- md_referral_sources
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- pbs_configuration
|
||||
- phone
|
||||
- prodtargethrs
|
||||
- production_config
|
||||
|
||||
@@ -103,28 +103,38 @@ exports.PbsSelectedCustomer = async function PbsSelectedCustomer(
|
||||
selectedCustomerId
|
||||
) {
|
||||
try {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`User selected customer ${selectedCustomerId || "NEW"}`
|
||||
);
|
||||
if (
|
||||
socket.JobData.bodyshop.pbs_configuration.disablecontactvehicle === false
|
||||
) {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`User selected customer ${selectedCustomerId || "NEW"}`
|
||||
);
|
||||
|
||||
//Upsert the contact information as per Wafaa's Email.
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`Upserting contact information to DMS for ${
|
||||
socket.JobData.ownr_fn || ""
|
||||
} ${socket.JobData.ownr_ln || ""} ${socket.JobData.ownr_co_nm || ""}`
|
||||
);
|
||||
const ownerRef = await UpsertContactData(socket, selectedCustomerId);
|
||||
//Upsert the contact information as per Wafaa's Email.
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`Upserting contact information to DMS for ${
|
||||
socket.JobData.ownr_fn || ""
|
||||
} ${socket.JobData.ownr_ln || ""} ${socket.JobData.ownr_co_nm || ""}`
|
||||
);
|
||||
const ownerRef = await UpsertContactData(socket, selectedCustomerId);
|
||||
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`Upserting vehicle information to DMS for ${socket.JobData.v_vin}`
|
||||
);
|
||||
await UpsertVehicleData(socket, ownerRef.ReferenceId);
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`Upserting vehicle information to DMS for ${socket.JobData.v_vin}`
|
||||
);
|
||||
await UpsertVehicleData(socket, ownerRef.ReferenceId);
|
||||
} else {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`Contact and Vehicle updates disabled. Skipping to accounting data insert.`
|
||||
);
|
||||
}
|
||||
CdkBase.createLogEvent(socket, "DEBUG", `Inserting account data.`);
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
|
||||
Reference in New Issue
Block a user