Updated process order import function for testing purpose.
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m4s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 1m0s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 1m11s
Laravel Pint / pint (pull_request) Successful in 3m1s
Laravel Larastan / larastan (pull_request) Failing after 3m47s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m4s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 1m0s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 1m11s
Laravel Pint / pint (pull_request) Successful in 3m1s
Laravel Larastan / larastan (pull_request) Failing after 3m47s
This commit is contained in:
@@ -221,6 +221,14 @@ class ProcessOrderImporter extends Importer
|
||||
$updatedBy = Filament::auth()->user()->name;
|
||||
}
|
||||
|
||||
$existing = ProcessOrder::where('plant_id', $plantId)->where('process_order', $processOrder)->first();
|
||||
|
||||
if ($existing) {
|
||||
$warnMsg[] = 'Process Order already exists!';
|
||||
} else {
|
||||
$warnMsg[] = 'New process order found!';
|
||||
}
|
||||
|
||||
if (! empty($warnMsg)) {
|
||||
throw new RowImportFailedException(implode(', ', $warnMsg));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user