@@ -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>
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ function BillEnterModalContainer({
|
|||||||
deductedfromlbr,
|
deductedfromlbr,
|
||||||
lbr_adjustment,
|
lbr_adjustment,
|
||||||
location: lineLocation,
|
location: lineLocation,
|
||||||
|
part_type,
|
||||||
...restI
|
...restI
|
||||||
} = i;
|
} = i;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { INSERT_NEW_DOCUMENT } from "../../graphql/documents.queries";
|
|||||||
import { axiosAuthInterceptorId } from "../../utils/CleanAxios";
|
import { axiosAuthInterceptorId } from "../../utils/CleanAxios";
|
||||||
import client from "../../utils/GraphQLClient";
|
import client from "../../utils/GraphQLClient";
|
||||||
import exifr from "exifr";
|
import exifr from "exifr";
|
||||||
|
import { store } from "../../redux/store";
|
||||||
|
|
||||||
//Context: currentUserEmail, bodyshop, jobid, invoiceid
|
//Context: currentUserEmail, bodyshop, jobid, invoiceid
|
||||||
|
|
||||||
@@ -112,7 +113,19 @@ export const uploadToCloudinary = async (
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (cloudinaryUploadResponse.status !== 200) {
|
if (cloudinaryUploadResponse.status !== 200) {
|
||||||
if (!!onError) onError(cloudinaryUploadResponse.statusText);
|
if (!!onError) {
|
||||||
|
onError(cloudinaryUploadResponse.statusText);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
axios.post("/newlog", {
|
||||||
|
message: "client-cloudinary-upload-error",
|
||||||
|
type: "error",
|
||||||
|
user: store.getState().user.email,
|
||||||
|
object: cloudinaryUploadResponse,
|
||||||
|
});
|
||||||
|
} catch (error) {}
|
||||||
|
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: i18n.t("documents.errors.insert", {
|
message: i18n.t("documents.errors.insert", {
|
||||||
message: cloudinaryUploadResponse.statusText,
|
message: cloudinaryUploadResponse.statusText,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -179,7 +179,10 @@ app.post("/data/arms", data.arms);
|
|||||||
|
|
||||||
var ioevent = require("./server/ioevent/ioevent");
|
var ioevent = require("./server/ioevent/ioevent");
|
||||||
app.post("/ioevent", ioevent.default);
|
app.post("/ioevent", ioevent.default);
|
||||||
|
app.post("/newlog", (req, res) => {
|
||||||
|
const { message, type, user, record, object } = req.body;
|
||||||
|
logger.log(message, type, user, record, object);
|
||||||
|
});
|
||||||
var cdkGetMake = require("./server/cdk/cdk-get-makes");
|
var cdkGetMake = require("./server/cdk/cdk-get-makes");
|
||||||
app.post("/cdk/getvehicles", fb.validateFirebaseIdToken, cdkGetMake.default);
|
app.post("/cdk/getvehicles", fb.validateFirebaseIdToken, cdkGetMake.default);
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ exports.default = async (req, res) => {
|
|||||||
.end({ allowEmptyTags: true });
|
.end({ allowEmptyTags: true });
|
||||||
|
|
||||||
allxmlsToUpload.push({
|
allxmlsToUpload.push({
|
||||||
|
count: autoHouseObject.AutoHouseExport.RepairOrder.length,
|
||||||
xml: ret,
|
xml: ret,
|
||||||
filename: `IM_${bodyshop.autohouseid}_${moment().format(
|
filename: `IM_${bodyshop.autohouseid}_${moment().format(
|
||||||
"DDMMYYYY_HHMMSS"
|
"DDMMYYYY_HHMMSS"
|
||||||
@@ -123,12 +124,12 @@ exports.default = async (req, res) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const xmlObj of allxmlsToUpload) {
|
// for (const xmlObj of allxmlsToUpload) {
|
||||||
fs.writeFileSync(`./logs/${xmlObj.filename}`, xmlObj.xml);
|
// fs.writeFileSync(`./logs/${xmlObj.filename}`, xmlObj.xml);
|
||||||
}
|
// }
|
||||||
|
|
||||||
res.json(allxmlsToUpload);
|
// res.json(allxmlsToUpload);
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
let sftp = new Client();
|
let sftp = new Client();
|
||||||
sftp.on("error", (errors) =>
|
sftp.on("error", (errors) =>
|
||||||
@@ -227,7 +228,11 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
|||||||
InsuredorClaimantFlag: null,
|
InsuredorClaimantFlag: null,
|
||||||
},
|
},
|
||||||
VehicleInformation: {
|
VehicleInformation: {
|
||||||
Year: parseInt(job.v_model_yr.match(/\d/g).join(""), 10) || "",
|
Year: job.v_model_yr
|
||||||
|
? parseInt(job.v_model_yr.match(/\d/g))
|
||||||
|
? parseInt(job.v_model_yr.match(/\d/g).join(""), 10)
|
||||||
|
: ""
|
||||||
|
: "",
|
||||||
Make: job.v_make_desc || "",
|
Make: job.v_make_desc || "",
|
||||||
Model: job.v_model_desc || "",
|
Model: job.v_model_desc || "",
|
||||||
VIN: job.v_vin || "",
|
VIN: job.v_vin || "",
|
||||||
@@ -267,22 +272,14 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
|||||||
},
|
},
|
||||||
Dates: {
|
Dates: {
|
||||||
DateofLoss:
|
DateofLoss:
|
||||||
(job.loss_date &&
|
(job.loss_date && moment(job.loss_date).format(AhDateFormat)) || "",
|
||||||
moment(job.loss_date)
|
|
||||||
.tz(job.bodyshop.timezone)
|
|
||||||
.format(AhDateFormat)) ||
|
|
||||||
"",
|
|
||||||
InitialCustomerContactDate: null,
|
InitialCustomerContactDate: null,
|
||||||
FirstFollowUpDate: null,
|
FirstFollowUpDate: null,
|
||||||
ReferralDate: null,
|
ReferralDate: null,
|
||||||
EstimateAppointmentDate: null,
|
EstimateAppointmentDate: null,
|
||||||
SecondFollowUpDate: null,
|
SecondFollowUpDate: null,
|
||||||
AssignedDate:
|
AssignedDate:
|
||||||
(job.asgn_date &&
|
(job.asgn_date && moment(job.asgn_date).format(AhDateFormat)) || "",
|
||||||
moment(job.asgn_date)
|
|
||||||
.tz(job.bodyshop.timezone)
|
|
||||||
.format(AhDateFormat)) ||
|
|
||||||
"",
|
|
||||||
EstComplete: null,
|
EstComplete: null,
|
||||||
CustomerAuthorizationDate: null,
|
CustomerAuthorizationDate: null,
|
||||||
InsuranceAuthorizationDate: null,
|
InsuranceAuthorizationDate: null,
|
||||||
@@ -808,9 +805,9 @@ const GenerateDetailLines = (job, line, statuses) => {
|
|||||||
MarkUp: null,
|
MarkUp: null,
|
||||||
OrderedOn:
|
OrderedOn:
|
||||||
(line.parts_order_lines[0] &&
|
(line.parts_order_lines[0] &&
|
||||||
moment(line.parts_order_lines[0].parts_order.order_date)
|
moment(line.parts_order_lines[0].parts_order.order_date).format(
|
||||||
.tz(job.bodyshop.timezone)
|
AhDateFormat
|
||||||
.format(AhDateFormat)) ||
|
)) ||
|
||||||
"",
|
"",
|
||||||
OriginalCost: null,
|
OriginalCost: null,
|
||||||
OriginalInvoiceNumber: null,
|
OriginalInvoiceNumber: null,
|
||||||
@@ -830,9 +827,7 @@ const GenerateDetailLines = (job, line, statuses) => {
|
|||||||
ExpectedOn: null,
|
ExpectedOn: null,
|
||||||
ReceivedOn:
|
ReceivedOn:
|
||||||
line.billlines[0] &&
|
line.billlines[0] &&
|
||||||
moment(line.billlines[0].bill.date)
|
moment(line.billlines[0].bill.date).format(AhDateFormat),
|
||||||
.tz(job.bodyshop.timezone)
|
|
||||||
.format(AhDateFormat),
|
|
||||||
OrderedBy: null,
|
OrderedBy: null,
|
||||||
ShipVia: null,
|
ShipVia: null,
|
||||||
VendorContact: null,
|
VendorContact: null,
|
||||||
|
|||||||
@@ -581,7 +581,6 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
|
|||||||
ownr_st
|
ownr_st
|
||||||
ownr_ph1
|
ownr_ph1
|
||||||
ownr_zip
|
ownr_zip
|
||||||
referral_source
|
|
||||||
loss_type
|
loss_type
|
||||||
v_model_yr
|
v_model_yr
|
||||||
v_model_desc
|
v_model_desc
|
||||||
|
|||||||
@@ -148,14 +148,14 @@ exports.job = async (req, res) => {
|
|||||||
|
|
||||||
//Propagate the expected load to each day.
|
//Propagate the expected load to each day.
|
||||||
const yesterday = moment().tz(timezone).subtract(1, "day");
|
const yesterday = moment().tz(timezone).subtract(1, "day");
|
||||||
const today = moment().tz(timezone).startOf("day");
|
const today = moment().tz(timezone);
|
||||||
|
|
||||||
const end = moment.tz(timezone).max([
|
const end = moment.max([
|
||||||
...filteredArrJobs.map((a) => moment(a.scheduled_in).tz(timezone)),
|
...filteredArrJobs.map((a) => moment(a.scheduled_in).tz(timezone)),
|
||||||
...filteredCompJobs
|
...filteredCompJobs
|
||||||
.map((p) => moment(p.actual_completion || p.scheduled_completion).tz(timezone))
|
.map((p) => moment(p.actual_completion || p.scheduled_completion).tz(timezone))
|
||||||
.filter((p) => p.isValid() && p.isAfter(yesterday)),
|
.filter((p) => p.isValid() && p.isAfter(yesterday)),
|
||||||
moment().tz(timezone).add(5, "days"),
|
moment().tz(timezone).add(15, "days"),
|
||||||
]);
|
]);
|
||||||
const range = Math.round(moment.duration(end.diff(today)).asDays());
|
const range = Math.round(moment.duration(end.diff(today)).asDays());
|
||||||
for (var day = 0; day < range; day++) {
|
for (var day = 0; day < range; day++) {
|
||||||
@@ -199,7 +199,7 @@ exports.job = async (req, res) => {
|
|||||||
const possibleDates = [];
|
const possibleDates = [];
|
||||||
delete load.productionTotal;
|
delete load.productionTotal;
|
||||||
const loadKeys = Object.keys(load).sort((a, b) =>
|
const loadKeys = Object.keys(load).sort((a, b) =>
|
||||||
moment(a).tz(timezone).isAfter(moment(b).tz(timezone)) ? 1 : -1
|
moment(a).isAfter(moment(b)) ? 1 : -1
|
||||||
);
|
);
|
||||||
|
|
||||||
loadKeys.forEach((loadKey) => {
|
loadKeys.forEach((loadKey) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user