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

Fixes: The currency values are formatted as per user preference

parent 6fe8e324
No related branches found
No related tags found
1 merge request!1032Fixes: The currency values are formatted as per user preference
......@@ -439,6 +439,7 @@ class Settings_LayoutEditor_Field_Model extends Vtiger_Field_Model {
if ($defaultValue) {
if ($this->getFieldDataType() == 'currency') {
//The argument for $skipformatting parameter is passed false to get value with user preference.
$defaultValue = $this->getCurrencyDisplayValue($defaultValue, false);
} else {
$defaultValue = $this->getDisplayValue($defaultValue);
......
......@@ -183,6 +183,7 @@ class Settings_LayoutEditor_Module_Model extends Vtiger_Module_Model {
} else if (strtolower($fieldType) == 'time') {
$defaultValue = Vtiger_Time_UIType::getTimeValueWithSeconds($defaultValue);
} else if (strtolower($fieldType) == 'currency') {
//The argument for $skipformatting parameter is passed false to get the value in DB format($).
$defaultValue = CurrencyField::convertToDBFormat($defaultValue, null, false);
} else if (strtolower($fieldType) == 'decimal') {
$defaultValue = CurrencyField::convertToDBFormat($defaultValue, null, true);
......
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