fix(ocp): delivery changes to happen after bookin is done
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user