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", "DEBUG",
`Inserting accounting posting data..` `Inserting accounting posting data..`
); );
await InsertAccountPostingData(socket); const insertResponse = await InsertAccountPostingData(socket);
CdkBase.createLogEvent(socket, "DEBUG", `Marking job as exported.`); if (insertResponse.WasSuccessful) {
await MarkJobExported(socket, socket.JobData.id); 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) { } catch (error) {
CdkBase.createLogEvent( CdkBase.createLogEvent(
socket, socket,