ranjith-dev #1589
@@ -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'.<br>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'.<br>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;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user