Remove additional RO posting.
This commit is contained in:
@@ -106,6 +106,7 @@ exports.PbsSelectedCustomer = async function PbsSelectedCustomer(socket, selecte
|
|||||||
"INFO",
|
"INFO",
|
||||||
`Contact and Vehicle updates disabled. Skipping to accounting data insert.`
|
`Contact and Vehicle updates disabled. Skipping to accounting data insert.`
|
||||||
);
|
);
|
||||||
|
//Must query for records to insert $0 RO.
|
||||||
if (!socket.ownerRef) {
|
if (!socket.ownerRef) {
|
||||||
const ownerRef = (await QueryCustomerBycodeFromDms(socket, selectedCustomerId))?.[0];
|
const ownerRef = (await QueryCustomerBycodeFromDms(socket, selectedCustomerId))?.[0];
|
||||||
socket.ownerRef = ownerRef;
|
socket.ownerRef = ownerRef;
|
||||||
@@ -118,12 +119,12 @@ exports.PbsSelectedCustomer = async function PbsSelectedCustomer(socket, selecte
|
|||||||
const insertResponse = await InsertAccountPostingData(socket);
|
const insertResponse = await InsertAccountPostingData(socket);
|
||||||
|
|
||||||
if (insertResponse.WasSuccessful) {
|
if (insertResponse.WasSuccessful) {
|
||||||
await CreateRepairOrderInPBS(socket, socket.ownerRef, socket.vehicleRef)
|
if (socket.JobData.bodyshop.pbs_configuration.ro_posting) {
|
||||||
CdkBase.createLogEvent(socket, "INFO", `Marking job as exported.`);
|
|
||||||
await MarkJobExported(socket, socket.JobData.id);
|
|
||||||
if (socket.jobData.bodyshop.pbs_configuration.ro_posting) {
|
|
||||||
await CreateRepairOrderInPBS(socket, socket.ownerRef, socket.vehicleRef)
|
await CreateRepairOrderInPBS(socket, socket.ownerRef, socket.vehicleRef)
|
||||||
}
|
}
|
||||||
|
CdkBase.createLogEvent(socket, "INFO", `Marking job as exported.`);
|
||||||
|
await MarkJobExported(socket, socket.JobData.id);
|
||||||
socket.emit("export-success", socket.JobData.id);
|
socket.emit("export-success", socket.JobData.id);
|
||||||
} else {
|
} else {
|
||||||
CdkBase.createLogEvent(socket, "ERROR", `Export was not successful.`);
|
CdkBase.createLogEvent(socket, "ERROR", `Export was not successful.`);
|
||||||
|
|||||||
Reference in New Issue
Block a user