1
0
forked from poc/pds

Validate production order length to be between 7 and 14 digits in both ProductionQuantityImporter and QualityValidationImporter

This commit is contained in:
dhanabalan
2025-08-05 12:03:49 +05:30
parent 197184e2ed
commit 6e61f83e3a
2 changed files with 2 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ class ProductionQuantityImporter extends Importer
if (Str::length($this->data['serial_number']) < 9 || !ctype_alnum($this->data['serial_number'])) {
$warnMsg[] = "Invalid serial number found";
}
if (Str::length($this->data['production_order']) > 0 && (Str::length($this->data['production_order']) < 7 || !is_numeric($this->data['production_order']))) {
if (Str::length($this->data['production_order']) > 0 && (Str::length($this->data['production_order']) < 7 || Str::length($this->data['production_order']) > 14 || !is_numeric($this->data['production_order']))) {
$warnMsg[] = "Invalid production order found";
}

View File

@@ -206,7 +206,7 @@ class QualityValidationImporter extends Importer
$warnMsg[] = "Sticker item code not found";
}
if (!is_numeric($this->data['production_order']) || Str::length($this->data['production_order']) < 7) {
if (!is_numeric($this->data['production_order']) || Str::length($this->data['production_order']) < 7 || Str::length($this->data['production_order']) > 14) {
$warnMsg[] = "Invalid production order found";
}