WIP PBS AP.

This commit is contained in:
Patrick Fic
2022-10-31 15:59:00 -07:00
parent cd96de3a96
commit ede1cdb89b
16 changed files with 418 additions and 174 deletions

View File

@@ -22,8 +22,10 @@ const {
PbsSelectedCustomer,
} = require("../accounting/pbs/pbs-job-export");
const PbsCalculateAllocationsAp =
require("../accounting/pbs/pbs-ap-allocations").default;
const {
PbsCalculateAllocationsAp,
PbsExportAp,
} = require("../accounting/pbs/pbs-ap-allocations");
io.use(function (socket, next) {
try {
@@ -139,9 +141,15 @@ io.on("connection", (socket) => {
"TRACE",
`Allocations calculated. ${JSON.stringify(allocations, null, 2)}`
);
socket.apAllocations = allocations;
callback(allocations);
});
socket.on("pbs-export-ap", ({ billids, txEnvelope }) => {
socket.txEnvelope = txEnvelope;
PbsExportAp(socket, { billids, txEnvelope });
});
//END PBS AP
socket.on("disconnect", () => {