Commented testing purpose logic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Laravel Pint / pint (pull_request) Successful in 3m1s
Laravel Larastan / larastan (pull_request) Failing after 3m21s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Laravel Pint / pint (pull_request) Successful in 3m1s
Laravel Larastan / larastan (pull_request) Failing after 3m21s
This commit is contained in:
@@ -135,9 +135,9 @@ class ProcessOrderImporter extends Importer
|
|||||||
} elseif ($processOrder && Str::contains($processOrder, '.')) {
|
} elseif ($processOrder && Str::contains($processOrder, '.')) {
|
||||||
$warnMsg[] = 'Invalid process order found!';
|
$warnMsg[] = 'Invalid process order found!';
|
||||||
}
|
}
|
||||||
// if ($lineNam == null || $lineNam == '') {
|
if ($lineNam == null || $lineNam == '') {
|
||||||
// $warnMsg[] = "Line name can't be empty!";
|
$warnMsg[] = "Line name can't be empty!";
|
||||||
// }
|
}
|
||||||
if ($orderQuan == null || $orderQuan == '') {
|
if ($orderQuan == null || $orderQuan == '') {
|
||||||
$warnMsg[] = "Order quantity can't be empty!";
|
$warnMsg[] = "Order quantity can't be empty!";
|
||||||
} elseif ($orderQuan == 0 || $orderQuan == '0') {
|
} elseif ($orderQuan == 0 || $orderQuan == '0') {
|
||||||
@@ -173,21 +173,21 @@ class ProcessOrderImporter extends Importer
|
|||||||
$plantId = $plant->id;
|
$plantId = $plant->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$existing = ProcessOrder::where('plant_id', $plantId)->where('process_order', $processOrder)->first();
|
// TESTING PURPOSE ONLY - TO CHECK DUPLICATE PROCESS ORDER WITH SAME COIL NUMBER FOR THE SAME PLANT
|
||||||
|
// $existing = ProcessOrder::where('plant_id', $plantId)->where('process_order', $processOrder)->first();
|
||||||
if ($existing) {
|
// if ($existing) {
|
||||||
$existing = ProcessOrder::where('plant_id', $plantId)->where('process_order', $processOrder)->where('coil_number', $coilNo)->first();
|
// $existing = ProcessOrder::where('plant_id', $plantId)->where('process_order', $processOrder)->where('coil_number', $coilNo)->first();
|
||||||
|
// if ($existing) {
|
||||||
if ($existing) {
|
// $warnMsg[] = 'Process Order with coil number already exists!';
|
||||||
$warnMsg[] = 'Process Order with coil number already exists!';
|
// } else {
|
||||||
}
|
// $warnMsg[] = 'Process order already exists!';
|
||||||
} else {
|
// }
|
||||||
$warnMsg[] = 'New process order found!';
|
// } else {
|
||||||
}
|
// $warnMsg[] = 'New process order found!';
|
||||||
|
// }
|
||||||
if (! empty($warnMsg)) {
|
// if (! empty($warnMsg)) {
|
||||||
throw new RowImportFailedException(implode(', ', $warnMsg));
|
// throw new RowImportFailedException(implode(', ', $warnMsg));
|
||||||
}
|
// }
|
||||||
|
|
||||||
$itemCode = Item::where('code', $iCode)->first();
|
$itemCode = Item::where('code', $iCode)->first();
|
||||||
if (! $itemCode) {
|
if (! $itemCode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user