Skip to content
Snippets Groups Projects
Commit 0b104a64 authored by Prasad's avatar Prasad
Browse files

Reverted !1185 MR fix to avoid truncated value with user-having less decimal precision

parent d35da896
No related branches found
No related tags found
No related merge requests found
......@@ -24,10 +24,17 @@ class Vtiger_Double_UIType extends Vtiger_Base_UIType {
* @return <Object>
*/
public function getDisplayValue($value, $record=false, $recordInstance=false) {
// Reverted applying currency like user-format (decimal) conversion
// as it would truncate values (on edit-save) when user-prefs has lower precision
// than field precision leads to loss of decimal part.
//
//The value is formatting to the user preffered format
//The third parameter for the converTouserFormat() function is skipConversion.
//We set skipConversion to true because there's no need to convert the values for different currency formats.
$value = CurrencyField::convertToUserFormat(decimalFormat($value), null, true);
/*$value = CurrencyField::convertToUserFormat(decimalFormat($value), null, true);*/
$value = decimalFormat($value);
return $value;
}
......@@ -40,4 +47,4 @@ class Vtiger_Double_UIType extends Vtiger_Base_UIType {
return $this->getDisplayValue($value);
}
}
\ No newline at end of file
}
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