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

Fixes: The double field values are converted to user format during workflow...

Fixes: 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
parent 9572e02d
No related branches found
No related tags found
No related merge requests found
......@@ -268,14 +268,17 @@ class VTUpdateFieldsTask extends VTTask {
$fieldValue = implode(' |##| ', $valueArray);
$fieldValueInDB = $fieldValue;
}
if ($fieldInstance && $fieldInstance->getFieldDataType() === 'double') {
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));
if(empty($decimalSeparator)) $decimalSeparator = ' ';
$fieldValue = str_replace(".", "$decimalSeparator", $fieldValue);
$fieldValueInDB = $fieldValue;
}
//The replacing of UTF-8 non-breaking space characters with space is to handle if the decimal separator is space.
$decimalSeparator = str_replace("\xC2\xA0", ' ', html_entity_decode($current_user->currency_decimal_separator, ENT_QUOTES, $default_charset));
if(empty($decimalSeparator)) $decimalSeparator = ' ';
/* When user prference digit grouping separator is dot(.), the dot will be removed while saving.
so the value converted to the user format which will not conflict while saving */
$fieldValue = str_replace(".", "$decimalSeparator", $fieldValue);
}
if($fieldInstance && $fieldInstance->getFieldDataType() == 'reference') {
......
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