Add PBS Error message.

This commit is contained in:
Patrick Fic
2022-02-11 14:45:28 -08:00
parent 75b2398421
commit 43b8842027

View File

@@ -141,12 +141,16 @@ exports.PbsSelectedCustomer = async function PbsSelectedCustomer(
"DEBUG",
`Inserting accounting posting data..`
);
await InsertAccountPostingData(socket);
const insertResponse = await InsertAccountPostingData(socket);
CdkBase.createLogEvent(socket, "DEBUG", `Marking job as exported.`);
await MarkJobExported(socket, socket.JobData.id);
if (insertResponse.WasSuccessful) {
CdkBase.createLogEvent(socket, "DEBUG", `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 {
CdkBase.createLogEvent(socket, "ERROR", `Export was not succesful.`);
}
} catch (error) {
CdkBase.createLogEvent(
socket,