Added all validations in process order

This commit is contained in:
dhanabalan
2025-11-18 10:35:47 +05:30
parent 1f64c3b36d
commit 5f1fcf4be4

View File

@@ -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";