fix(ocp): delivery changes to happen after bookin is done

This commit is contained in:
2025-04-02 21:26:15 -05:00
parent 4f3b5d75a2
commit f771db6034
2 changed files with 7 additions and 5 deletions

View File

@@ -69,6 +69,7 @@ export const bookInLabel = async (data: any) => {
message: `${parseInt(
data.SSCC.slice(10, -1)
)}, was just booked in`,
data: { SSCC: data.SSCC },
};
} catch (error) {
createLog(

View File

@@ -59,11 +59,11 @@ export const labelingProcess = async ({
"error",
"labeling",
"ocp",
`There is not a lot assigned to ${macId[0].Name}.`
`There is not a lot assigned to ${macId[0]?.Name}.`
);
return {
success: false,
message: `There is not a lot assigned to ${macId[0].Name}.`,
message: `There is not a lot assigned to ${macId[0]?.Name}.`,
};
}
}
@@ -217,9 +217,9 @@ export const labelingProcess = async ({
// send over to be booked in if we can do it.
const bookin = settingData.filter((s) => s.name === "bookin");
let book: any = [];
if (bookin[0].value === "1") {
const book = await bookInLabel(label.data);
book = await bookInLabel(label.data);
} else {
createLog("info", "labeling", "ocp", "Bookin is turned off.");
@@ -231,7 +231,8 @@ export const labelingProcess = async ({
(s) => s.name === "inhouseDelivery"
);
if (inhouseDelivery[0].value === "1") {
const deliverPallet = await delieryInhouse(label);
const deliverPallet = await delieryInhouse(book.data);
// console.log(deliverPallet);
}
return {