From fea534e5f33efcd8484309bc8620a75e7f681d81 Mon Sep 17 00:00:00 2001 From: ManuSinergiaCRM Date: Mon, 9 Dec 2024 16:55:13 +0000 Subject: [PATCH] =?UTF-8?q?Eliminar=20validaci=C3=B3n=20innecesaria=20del?= =?UTF-8?q?=20proceso=20de=20validaci=C3=B3n=20de=20importaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImporterValidationFunctions.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/stic_Import_Validation/ImporterValidationFunctions.php b/modules/stic_Import_Validation/ImporterValidationFunctions.php index b6552291138..86a8c764613 100644 --- a/modules/stic_Import_Validation/ImporterValidationFunctions.php +++ b/modules/stic_Import_Validation/ImporterValidationFunctions.php @@ -39,10 +39,10 @@ function identificationNumberValidation($module, $rowValue, $row) // since in $row we have the label and not the key global $app_list_strings; $identification_types_list = $app_list_strings['stic_contacts_identification_types_list']; - $existLabel = false; + // $existLabel = false; foreach ($identification_types_list as $key => $value) { if (!empty($value) && in_array($value, $row)){ - $existLabel = true; + // $existLabel = true; // If the stic_identification_type_c field is mapped and its value is NIF or NIE if ($value == $identification_types_list['nif'] || $value == $identification_types_list['nie']) { return SticUtils::isValidNIForNIE($rowValue) ? $rowValue : 'LBL_ERROR_INVALID_IDENTIFICATION_NUMBER'; @@ -51,10 +51,14 @@ function identificationNumberValidation($module, $rowValue, $row) } } } + + // This validation is cancelled because the CRM has a LH that calculates the Identification Type in case this field is not informed and the Identification Number field is. + // More information at: // If there is no label, it means that the Identification type field has not been mapped - if (!$existLabel) { - return 'LBL_ERROR_INVALID_IDENTIFICATION_NUMBER_MISSING_TYPE_FIELD'; - } + // if (!$existLabel) { + // return 'LBL_ERROR_INVALID_IDENTIFICATION_NUMBER_MISSING_TYPE_FIELD'; + // } + return true; break; default: