changed logic in create invoice #1525
@@ -4097,29 +4097,29 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$panelBoxExist = PanelBoxValidation::where('plant_id', $plantId)->where('panel_box_supplier', $supplierNo)->where('panel_box_serial_number', $pBoxSNo)->first();
|
// $panelBoxExist = PanelBoxValidation::where('plant_id', $plantId)->where('panel_box_supplier', $supplierNo)->where('panel_box_serial_number', $pBoxSNo)->first();
|
||||||
|
|
||||||
if(!$panelBoxExist){
|
// if(!$panelBoxExist){
|
||||||
Notification::make()
|
// Notification::make()
|
||||||
->title('Unknwon : Serial Number')
|
// ->title('Unknwon : Serial Number')
|
||||||
->body("Scanned Panel Box Serial Number '$serNo' was not found in Panel Box Validation.<br>Please complete the testing process for this Panel Box before proceeding.")
|
// ->body("Scanned Panel Box Serial Number '$serNo' was not found in Panel Box Validation.<br>Please complete the testing process for this Panel Box before proceeding.")
|
||||||
->danger()
|
// ->danger()
|
||||||
->seconds(3)
|
// ->seconds(3)
|
||||||
->send();
|
// ->send();
|
||||||
|
|
||||||
$this->dispatch('playWarnSound');
|
// $this->dispatch('playWarnSound');
|
||||||
|
|
||||||
$this->form->fill([
|
// $this->form->fill([
|
||||||
'plant_id' => $plantId,
|
// 'plant_id' => $plantId,
|
||||||
'invoice_number' => $invoiceNumber,
|
// 'invoice_number' => $invoiceNumber,
|
||||||
'serial_number' => null,
|
// 'serial_number' => null,
|
||||||
'total_quantity' => $totQuan,
|
// 'total_quantity' => $totQuan,
|
||||||
'update_invoice' => false,
|
// 'update_invoice' => false,
|
||||||
'scanned_quantity' => $scanSQuan,
|
// 'scanned_quantity' => $scanSQuan,
|
||||||
]);
|
// ]);
|
||||||
|
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// $notOkPanelBox = PanelBoxValidation::where('plant_id', $plantId)->where('panel_box_supplier', $supplierNo)->where('panel_box_serial_number', $pBoxSNo)->first();
|
// $notOkPanelBox = PanelBoxValidation::where('plant_id', $plantId)->where('panel_box_supplier', $supplierNo)->where('panel_box_serial_number', $pBoxSNo)->first();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user