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