Added all validations in process order
This commit is contained in:
@@ -79,6 +79,30 @@ class ProcessOrderImporter extends Importer
|
||||
$warnMsg[] = "Item Code not found";
|
||||
}
|
||||
|
||||
$processOrder = trim($this->data['process_order'] ?? '');
|
||||
|
||||
if ($processOrder == '') {
|
||||
$warnMsg[] = "Process Order cannot be empty";
|
||||
}
|
||||
|
||||
$coilNo = trim($this->data['coil_number'] ?? '');
|
||||
|
||||
if ($coilNo == '') {
|
||||
$warnMsg[] = "Coil Number cannot be empty";
|
||||
}
|
||||
|
||||
$ordQuan = trim($this->data['order_quantity'] ?? '');
|
||||
|
||||
if ($ordQuan == '') {
|
||||
$warnMsg[] = "Order Quantity cannot be empty";
|
||||
}
|
||||
|
||||
$recQuan = trim($this->data['received_quantity'] ?? '');
|
||||
|
||||
if ($recQuan == '') {
|
||||
$warnMsg[] = "Received Quantity cannot be empty";
|
||||
}
|
||||
|
||||
$user = User::where('name', $this->data['created_by'])->first();
|
||||
if (!$user) {
|
||||
$warnMsg[] = "User not found";
|
||||
|
||||
Reference in New Issue
Block a user