Added serial_number minimum length should be 9 digit and notification display duration and updated validations
This commit is contained in:
@@ -77,9 +77,10 @@ class InvoiceFinder extends Page implements HasForms
|
||||
if(!$invoiceNo)
|
||||
{
|
||||
Notification::make()
|
||||
->title("Invoice number '$invoiceNo' can't be empty!")
|
||||
->danger()
|
||||
->send();
|
||||
->title("Invoice number '$invoiceNo' can't be empty!")
|
||||
->danger()
|
||||
->duration(1200)
|
||||
->send();
|
||||
$this->dispatch('loadData', '', [], [], [], [], $plantId);
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
@@ -98,13 +99,14 @@ class InvoiceFinder extends Page implements HasForms
|
||||
if(!$invoiceExists)
|
||||
{
|
||||
Notification::make()
|
||||
->title("Invoice number '$invoiceNo' does not exist in locator invoice table!")
|
||||
->danger()
|
||||
->send();
|
||||
->title("Invoice number '$invoiceNo' does not exist in locator invoice table!")
|
||||
->danger()
|
||||
->duration(2000)
|
||||
->send();
|
||||
$this->dispatch('loadData', '', [], [], [], [], $plantId);
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'scan_invoice' => $invoiceNo,
|
||||
'scan_invoice' => null,//$invoiceNo,
|
||||
'total_sno_quantity' => 0,
|
||||
'pending_quantity' => 0,
|
||||
'scan_quantity' => 0
|
||||
@@ -120,21 +122,22 @@ class InvoiceFinder extends Page implements HasForms
|
||||
|
||||
if(!$invoiceCompleted)
|
||||
{
|
||||
$count = LocatorInvoiceValidation::where('invoice_number', $invoiceNo)
|
||||
->where('plant_id', $plantId)
|
||||
->count();
|
||||
// $count = LocatorInvoiceValidation::where('invoice_number', $invoiceNo)
|
||||
// ->where('plant_id', $plantId)
|
||||
// ->count();
|
||||
Notification::make()
|
||||
->title("Invoice number '$invoiceNo' already completed the scanning process...")
|
||||
->success()
|
||||
->send();
|
||||
->title("Invoice number '$invoiceNo' already completed the scanning process..!")
|
||||
->success()
|
||||
->duration(2000)
|
||||
->send();
|
||||
$this->dispatch('loadData', '', [], [], [], [], $plantId);
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'scan_invoice' => $invoiceNo,
|
||||
'total_sno_quantity' => $count,
|
||||
'pending_quantity' => 0,
|
||||
'scan_quantity' => $count
|
||||
'scan_invoice' => null,//$invoiceNo,
|
||||
'total_sno_quantity' => 0,//$count,
|
||||
'pending_quantity' => 0,//0,
|
||||
'scan_quantity' => 0//$count
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user