1
0
forked from poc/pds

Updated process order import function for testing purpose.

This commit is contained in:
dhanabalan
2026-03-01 13:53:59 +05:30
parent 1e455088f3
commit 2a9df38262

View File

@@ -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));
}