fix(ocme): cycle counts on an empty stock row would crash corrected so this wont happen

This commit is contained in:
2025-04-21 07:49:39 -05:00
parent 8240e9c5d3
commit d65450d5ee

View File

@@ -81,7 +81,9 @@ export const cycleCount = async (lane: any, user: User) => {
const postCount = {
laneId: ocme[0].alpla_laneID,
warehouseName: "",
laneName: alplaStock[0].alpla_laneDescription,
laneName: alplaStock[0]?.alpla_laneDescription
? alplaStock[0].alpla_laneDescription
: ocme[0].alpla_laneDescription,
good: !combineBoth.every(
(s) => !s.info.includes("Validate") || !s.info.includes("sent")
),