From b7e43aa9e76ab8ee0a21c362d3d60fdfc39589fe Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Fri, 11 Sep 2026 16:10:44 +0530 Subject: [PATCH] dded supplier logic in panel box inspection page --- app/Filament/Pages/PanelBoxInspectionStock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Filament/Pages/PanelBoxInspectionStock.php b/app/Filament/Pages/PanelBoxInspectionStock.php index f9354ee..eb9130f 100644 --- a/app/Filament/Pages/PanelBoxInspectionStock.php +++ b/app/Filament/Pages/PanelBoxInspectionStock.php @@ -428,12 +428,12 @@ class PanelBoxInspectionStock extends Page } } - $serialExists = PanelBoxValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->first(); + $serialExists = PanelBoxValidation::where('plant_id', $plantId)->where('serial_number', $serialNumber)->where('panel_box_supplier', $supplier)->first(); if ($serialExists) { Notification::make() ->title('Duplicate Serial Number') - ->body("Serial number already exists $serialNumber.") + ->body("Serial number already exists '$serialNumber' with supplier number '$supplier'.") ->danger() ->send(); $this->form->fill([ -- 2.49.1