From 83c270ef0979c639ab8242524b1324370ec37899 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 27 Oct 2026 10:19:01 +0530 Subject: [PATCH] changed logic in panel box inspection stock --- app/Filament/Pages/PanelBoxInspectionStock.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Filament/Pages/PanelBoxInspectionStock.php b/app/Filament/Pages/PanelBoxInspectionStock.php index 16fa4747..66c4aad2 100644 --- a/app/Filament/Pages/PanelBoxInspectionStock.php +++ b/app/Filament/Pages/PanelBoxInspectionStock.php @@ -446,12 +446,14 @@ class PanelBoxInspectionStock extends Page } } - $panelExistsInvoice = InvoiceValidation::where('plant_id', $this->plantId) + $panelExistsInvoice = InvoiceValidation::where('plant_id', $plantId) ->where('panel_box_serial_number', $serialNumber) // ->where('panel_box_code', $itemCode) ->where('panel_box_supplier', $supplier) ->first(); + + if ($panelExistsInvoice) { Notification::make() ->title('Duplicate Panel Box Serial Number')