feat(ocp): materials contorls and transfer to next lot logic

This commit is contained in:
2025-08-19 16:00:49 -05:00
parent a183279268
commit 88f61c8eaa
11 changed files with 997 additions and 53 deletions

View File

@@ -170,20 +170,15 @@ export const labelingProcess = async ({
};
}
// check mm is good
// check the material... mm,color (auto and manual combined), pkg
const mmStaged = await isMainMatStaged(filteredLot[0]);
if (!mmStaged) {
createLog(
"error",
"labeling",
"ocp",
`Main material is not prepaired for lot ${filteredLot[0].lot}`
);
if (!mmStaged.success) {
createLog("error", "labeling", "ocp", mmStaged.message);
return {
success: false,
message: `Main material is not prepaired for lot ${filteredLot[0].lot}`,
message: mmStaged.message,
};
}