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