1
0
forked from poc/pds

Added rework_status value validation on importer

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)) {