Check for blank string on owner name

This commit is contained in:
Patrick Fic
2022-08-15 10:45:19 -07:00
parent 503e901295
commit 129c94f066

View File

@@ -431,7 +431,7 @@ async function QueryDmsCustomerById(socket, JobData, CustomerId) {
async function QueryDmsCustomerByName(socket, JobData) { async function QueryDmsCustomerByName(socket, JobData) {
const ownerName = ( const ownerName = (
JobData.ownr_co_nm JobData.ownr_co_nm && JobData.ownr_co_nm !== ""
? JobData.ownr_co_nm ? JobData.ownr_co_nm
: `${JobData.ownr_ln},${JobData.ownr_fn}` : `${JobData.ownr_ln},${JobData.ownr_fn}`
).replace(replaceSpecialRegex, ""); ).replace(replaceSpecialRegex, "");
@@ -725,7 +725,7 @@ async function InsertDmsVehicle(socket) {
manufacturer: {}, manufacturer: {},
vehicle: { vehicle: {
deliveryDate: moment() deliveryDate: moment()
// .tz(socket.JobData.bodyshop.timezone) // .tz(socket.JobData.bodyshop.timezone)
.format("YYYYMMDD"), .format("YYYYMMDD"),
licensePlateNo: socket.JobData.plate_no, licensePlateNo: socket.JobData.plate_no,
make: socket.txEnvelope.dms_make, make: socket.txEnvelope.dms_make,
@@ -854,7 +854,7 @@ async function UpdateDmsVehicle(socket) {
socket.DMSVeh.dealer.inServiceDate || socket.DMSVeh.dealer.inServiceDate ||
socket.txEnvelope.inservicedate socket.txEnvelope.inservicedate
) )
// .tz(socket.JobData.bodyshop.timezone) // .tz(socket.JobData.bodyshop.timezone)
.toISOString(), .toISOString(),
}), }),
}, },