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([