From 8cf35160944be2a2481c9bdea28a175934c0b05b Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Thu, 29 Oct 2026 10:25:33 +0530 Subject: [PATCH] Changed logic in invoice data table --- app/Livewire/InvoiceDataTable.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/Livewire/InvoiceDataTable.php b/app/Livewire/InvoiceDataTable.php index 9f2a9fb1..df92af86 100644 --- a/app/Livewire/InvoiceDataTable.php +++ b/app/Livewire/InvoiceDataTable.php @@ -882,6 +882,20 @@ class InvoiceDataTable extends Component return; } + + $panelExistNotOk = PanelBoxValidation::where('plant_id', $this->plantId)->where('panel_box_serial_number', $serialNumber)->where('panel_box_code', $itemCode)->where('panel_box_supplier', $supplier)->whereNotNull('status')->where('status', '!=', '')->first(); + + if($panelExistNotOk){ + Notification::make() + ->title('Panel Not Ok') + ->body("Panel Quality Inspection NotOk.
Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.
") + ->danger() + ->seconds(2) + ->send(); + $this->capacitorInput = ''; + + return; + } } $this->package = InvoiceValidation::with('stickerMasterRelation')