Added rework_status value validation on importer
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Laravel Pint / pint (pull_request) Successful in 2m36s
Laravel Larastan / larastan (pull_request) Failing after 4m2s

This commit is contained in:
dhanabalan
2026-02-23 15:41:36 +05:30
parent 5afc8afa1a
commit dc0bf9a9a7

View File

@@ -142,8 +142,12 @@ class ProcessOrderImporter extends Importer
if ($recQuan == null || $recQuan == '') {
$recQuan = 0;
}
if ($reworkStatus == null || $reworkStatus = '') {
if ($reworkStatus == null || $reworkStatus = '' || $reworkStatus == 0 || $reworkStatus = '0') {
$reworkStatus = 0;
} elseif ($reworkStatus == 1 || $reworkStatus = '1') {
$reworkStatus = 1;
} else {
$warnMsg[] = 'Invalid rework status found';
}
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {