Skip to content
Snippets Groups Projects
Commit fbb42a45 authored by madhu sr's avatar madhu sr
Browse files

#Fixes::158980362::madhusr::decimal field value is updating with the incorrect...

#Fixes::158980362::madhusr::decimal field value is updating with the incorrect value from the workflow
parent 0c4c8699
No related branches found
No related tags found
1 merge request!1142Fixes: The double field values are converted to user format during workflow updates, as we verify against the user format and adjust them to the database format prior to saving
......@@ -269,6 +269,17 @@ class VTUpdateFieldsTask extends VTTask {
$fieldValueInDB = $fieldValue;
}
if ($fieldInstance && $fieldInstance->getUIType() === '7') {
if (in_array($fieldInstance->getFieldDataType(), array('N', 'NN'))) {
$decimalSeparator = str_replace("\xC2\xA0", ' ', html_entity_decode($current_user->currency_decimal_separator, ENT_QUOTES, $default_charset));
file_put_contents('mylog.log', print_r( $decimalSeparator, true), FILE_APPEND);
file_put_contents('mylog.log', print_r( "\n", true), FILE_APPEND);
if(empty($decimalSeparator)) $decimalSeparator = ' ';
$fieldValue = str_replace(".", "$decimalSeparator", $fieldValue);
$fieldValueInDB = $fieldValue;
}
}
if($fieldInstance && $fieldInstance->getFieldDataType() == 'reference') {
$referenceModuleList = $fieldInstance->getReferenceList();
$fieldReferenceModule = $referenceModuleList[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment