Skip to content
Snippets Groups Projects
Commit 7ea96ab9 authored by Prasad's avatar Prasad
Browse files

Merge branch '158980362' into 'master'

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

See merge request !1142
parents 264a32f8 5641793a
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
......@@ -268,6 +268,18 @@ class VTUpdateFieldsTask extends VTTask {
$fieldValue = implode(' |##| ', $valueArray);
$fieldValueInDB = $fieldValue;
}
if ($fieldInstance && $fieldInstance->getFieldDataType() === 'double') {
//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') {
$referenceModuleList = $fieldInstance->getReferenceList();
......
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