Changed logic in gr master importer
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 19s
Laravel Pint / pint (pull_request) Successful in 4m45s
Laravel Larastan / larastan (pull_request) Failing after 5m27s

This commit is contained in:
dhanabalan
2026-11-16 15:03:57 +05:30
parent 66f9141526
commit d8345c7975

View File

@@ -106,11 +106,12 @@ class GrMasterImporter extends Importer
} }
$grNumberExists = GrMaster::where('plant_id', $plant->id) $grNumberExists = GrMaster::where('plant_id', $plant->id)
->where('serial_number', $this->data['serial_number'])
->where('gr_number', $this->data['gr_number']) ->where('gr_number', $this->data['gr_number'])
->first(); ->first();
if ($grNumberExists) { if ($grNumberExists) {
$warnMsg[] = 'GR Number already exists for this plant!'; $warnMsg[] = 'GR Number already exists against serial number for this plant!';
} }
if (! empty($warnMsg)) { if (! empty($warnMsg)) {