From d64f02fd5ecc10dac039698c271115f3e7d8ec0c Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 12 Sep 2026 09:40:32 +0530 Subject: [PATCH] Added logic in rework of panel box validation --- app/Filament/Resources/PanelBoxValidationResource.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Filament/Resources/PanelBoxValidationResource.php b/app/Filament/Resources/PanelBoxValidationResource.php index b00e054..ad3c4fa 100644 --- a/app/Filament/Resources/PanelBoxValidationResource.php +++ b/app/Filament/Resources/PanelBoxValidationResource.php @@ -1003,16 +1003,14 @@ class PanelBoxValidationResource extends Resource ->where('inspection_lot_number', $inspecLotNo) ->first(); - $alreadyExistsSupplier = PanelBoxValidation::where('serial_number', $serialNumber) - ->where('plant_id', $plantId) + $alreadyExistsSupplier = PanelBoxValidation::where('plant_id', $plantId)->where('serial_number', $serialNumber) + ->where('panel_box_supplier', $supplierNo) ->first(); if ($alreadyExists) { Notification::make() ->title('Duplicate Found') - ->body( - 'This document number and inspection lot number have already been used for this serial number. Please provide a new document number and inspection lot number for rework...' - ) + ->body('This document number and inspection lot number have already been used for this serial number. Please provide a new document number and inspection lot number for rework...') ->danger() ->send(); -- 2.49.1