From e3c07011babdeeb8098ce3330e0b557979f79a6b Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 26 Oct 2026 19:05:58 +0530 Subject: [PATCH] changed logic in invoice data table --- app/Livewire/InvoiceDataTable.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app/Livewire/InvoiceDataTable.php b/app/Livewire/InvoiceDataTable.php index 6e72d362..1ff6991a 100644 --- a/app/Livewire/InvoiceDataTable.php +++ b/app/Livewire/InvoiceDataTable.php @@ -850,20 +850,6 @@ class InvoiceDataTable extends Component if($categoryExist?->category == 'Panel Box'){ - $panelExist = PanelBoxValidation::where('plant_id', $this->plantId)->where('panel_box_serial_number', $serialNumber)->where('panel_box_code', $itemCode)->where('panel_box_supplier', $supplier)->first(); - - if(!$panelExist){ - Notification::make() - ->title('Panel Not Verified') - ->body("Panel Quality Inspection failed.
Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.
") - ->danger() - ->seconds(2) - ->send(); - $this->capacitorInput = ''; - - return; - } - $panelExistsInvoice = InvoiceValidation::where('plant_id', $this->plantId) ->where('panel_box_serial_number', $serialNumber) // ->where('panel_box_code', $itemCode) @@ -882,6 +868,20 @@ class InvoiceDataTable extends Component return; } + + $panelExist = PanelBoxValidation::where('plant_id', $this->plantId)->where('panel_box_serial_number', $serialNumber)->where('panel_box_code', $itemCode)->where('panel_box_supplier', $supplier)->first(); + + if(!$panelExist){ + Notification::make() + ->title('Panel Not Verified') + ->body("Panel Quality Inspection failed.
Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.
") + ->danger() + ->seconds(2) + ->send(); + $this->capacitorInput = ''; + + return; + } } $this->package = InvoiceValidation::with('stickerMasterRelation')