fix(labelprocessing): some strange lot issues to catch
This commit is contained in:
@@ -62,7 +62,7 @@ export const labelingProcess = async ({
|
|||||||
(l: any) => l.MachineID === macId[0]?.HumanReadableId
|
(l: any) => l.MachineID === macId[0]?.HumanReadableId
|
||||||
);
|
);
|
||||||
|
|
||||||
if (filteredLot.length === 0) {
|
if (filteredLot?.length === 0) {
|
||||||
createLog(
|
createLog(
|
||||||
"error",
|
"error",
|
||||||
"labeling",
|
"labeling",
|
||||||
@@ -85,7 +85,7 @@ export const labelingProcess = async ({
|
|||||||
(l: any) => l.MachineID === macId[0]?.HumanReadableId
|
(l: any) => l.MachineID === macId[0]?.HumanReadableId
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!filteredLot || filteredLot.length === 0) {
|
if (!filteredLot || filteredLot?.length === 0) {
|
||||||
createLog(
|
createLog(
|
||||||
"error",
|
"error",
|
||||||
"labeling",
|
"labeling",
|
||||||
@@ -138,7 +138,7 @@ export const labelingProcess = async ({
|
|||||||
let dualPrinting = settingData.filter((d) => d.name === "dualPrinting")[0]
|
let dualPrinting = settingData.filter((d) => d.name === "dualPrinting")[0]
|
||||||
?.value;
|
?.value;
|
||||||
|
|
||||||
if (filteredLot.length > 1 && dualPrinting === "0") {
|
if (filteredLot?.length > 1 && dualPrinting === "0") {
|
||||||
createLog(
|
createLog(
|
||||||
"error",
|
"error",
|
||||||
"labeling",
|
"labeling",
|
||||||
@@ -151,7 +151,7 @@ export const labelingProcess = async ({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filteredLot.length > 1 && dualPrinting === "1") {
|
if (filteredLot?.length > 1 && dualPrinting === "1") {
|
||||||
// send over for dual printing processing
|
// send over for dual printing processing
|
||||||
createLog(
|
createLog(
|
||||||
"info",
|
"info",
|
||||||
@@ -193,7 +193,7 @@ export const labelingProcess = async ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if we actaully have a lot passed over so we do not error out again.
|
// check if we actaully have a lot passed over so we do not error out again.
|
||||||
if (filteredLot.length === 0) {
|
if (filteredLot?.length === 0) {
|
||||||
createLog(
|
createLog(
|
||||||
"error",
|
"error",
|
||||||
"labeling",
|
"labeling",
|
||||||
@@ -234,8 +234,8 @@ export const labelingProcess = async ({
|
|||||||
|
|
||||||
// do we want to over run
|
// do we want to over run
|
||||||
if (
|
if (
|
||||||
filteredLot[0].overPrinting === "no" &&
|
filteredLot[0]?.overPrinting === "no" &&
|
||||||
filteredLot[0].Remaining <= 0
|
filteredLot[0]?.Remaining <= 0
|
||||||
) {
|
) {
|
||||||
createLog(
|
createLog(
|
||||||
"error",
|
"error",
|
||||||
|
|||||||
Reference in New Issue
Block a user