diff --git a/app/Filament/Pages/PanelBoxInspectionStock.php b/app/Filament/Pages/PanelBoxInspectionStock.php index bbc2b5d6..c0a7900a 100644 --- a/app/Filament/Pages/PanelBoxInspectionStock.php +++ b/app/Filament/Pages/PanelBoxInspectionStock.php @@ -447,9 +447,12 @@ class PanelBoxInspectionStock extends Page } $panelExistsInvoice = InvoiceValidation::where('plant_id', $plantId) - ->where('panel_box_serial_number', $serialNumber) - ->where('panel_box_supplier', $supplier) - ->first(); + ->where('panel_box_serial_number', $serialNumber) + ->where('panel_box_supplier', $supplier) + ->where('panel_box_code', $panelBoxCode) + ->first(); + + // dd($panelExistsInvoice); if ($panelExistsInvoice) { Notification::make() @@ -486,20 +489,20 @@ class PanelBoxInspectionStock extends Page ]); return; } - else{ - Notification::make() - ->title('Already Scanned In Stock') - ->body("Serial number already scanned '$serialNumber' with supplier number '$supplier'.
Please scan this serial number in Invoice Validation.") - ->success() - ->send(); - $this->dispatch('play-error-sound'); - $this->form->fill([ - 'plant_id' => $plantId, - 'line_id' => $lineId, - 'item_id' => null, - ]); - return; - } + // else{ + // Notification::make() + // ->title('Already Scanned In Stock') + // ->body("Serial number already scanned '$serialNumber' with supplier number '$supplier'.
Please scan this serial number in Invoice Validation.") + // ->success() + // ->send(); + // $this->dispatch('play-error-sound'); + // $this->form->fill([ + // 'plant_id' => $plantId, + // 'line_id' => $lineId, + // 'item_id' => null, + // ]); + // return; + // } } diff --git a/app/Livewire/InvoiceDataTable.php b/app/Livewire/InvoiceDataTable.php index b2e649c7..38fb350b 100644 --- a/app/Livewire/InvoiceDataTable.php +++ b/app/Livewire/InvoiceDataTable.php @@ -852,7 +852,7 @@ class InvoiceDataTable extends Component $panelExistsInvoice = InvoiceValidation::where('plant_id', $this->plantId) ->where('panel_box_serial_number', $serialNumber) - // ->where('panel_box_code', $itemCode) + ->where('panel_box_code', $itemCode) ->where('panel_box_supplier', $supplier) ->first();