From 92f7d0bf29e26246a580c6755ce4e446850c3fa9 Mon Sep 17 00:00:00 2001 From: objec Date: Fri, 6 Mar 2026 18:03:33 +0400 Subject: [PATCH] Refactored Stock Locations validation inside general validation Signed-off-by: objec --- app/Controllers/Items.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Items.php b/app/Controllers/Items.php index 15acf5a29..beb8517ec 100644 --- a/app/Controllers/Items.php +++ b/app/Controllers/Items.php @@ -1093,12 +1093,12 @@ class Items extends Secure_Controller * * @param array $row * @param array $itemData - * @param array $allowedLocations + * @param array $allowedStockLocations * @param array $definitionNames * @param array $attributeData * @return bool Returns false if all data checks out and true when there is an error in the data */ - private function validateCSVData(array $row, array $itemData, array $allowedLocations, array $definitionNames, array $attributeData): bool // TODO: Long function and large number of parameters in the declaration... perhaps refactoring is needed + private function validateCSVData(array $row, array $itemData, array $allowedStockLocations, array $definitionNames, array $attributeData): bool // TODO: Long function and large number of parameters in the declaration... perhaps refactoring is needed { $itemId = $row['Id']; $isUpdate = (bool)$itemId; @@ -1136,7 +1136,7 @@ class Items extends Secure_Controller 'Tax 2 Percent' => $row['Tax 2 Percent'] ]; - foreach ($allowedLocations as $location_name) { + foreach ($allowedStockLocations as $location_name) { $valuesToCheckForNumeric[] = $row["location_$location_name"]; }