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