diff --git a/app/Filament/Pages/BulkStickerPrinting.php b/app/Filament/Pages/BulkStickerPrinting.php index 24fb521..6ae0e74 100644 --- a/app/Filament/Pages/BulkStickerPrinting.php +++ b/app/Filament/Pages/BulkStickerPrinting.php @@ -901,7 +901,7 @@ class BulkStickerPrinting extends Page implements HasForms } } - $updatePrintStatusCompleted = StickerOrder::where('plant_id', $plantId)->where('production_order', $pOrder)->where('from_serial_number', $fromSerNo)->where('to_serial_number', $toSerNo)->where('sticker_id', $stickerId)->where('print_status', 'Printed')->first(); + $updatePrintStatusCompleted = StickerOrder::where('plant_id', $plantId)->where('production_order', $pOrder)->where('sticker_id', $stickerId)->where('from_serial_number', $fromSerNo)->where('to_serial_number', $toSerNo)->where('sticker_id', $stickerId)->where('print_status', 'Printed')->first(); if ($updatePrintStatusCompleted) { Notification::make() @@ -914,6 +914,7 @@ class BulkStickerPrinting extends Page implements HasForms $existingSticker = StickerOrder::where('plant_id', $plantId) ->where('production_order', $pOrder) + ->where('sticker_id', $stickerId) ->where('print_status', 'Printed') ->where(function ($query) use ($fromSerNo, $toSerNo) { $query->whereIn('from_serial_number', [$fromSerNo, $toSerNo]) @@ -1096,7 +1097,6 @@ class BulkStickerPrinting extends Page implements HasForms return; } - // dd($matchedMachineId); $itemCharacteristic = ClassCharacteristic::where('plant_id', $plantId) ->where('item_id', $itemCharacteristicId)