diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index f3fa1c670c6..8c9d60f1fe7 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -452,11 +452,13 @@ while ($i < min($num, $limit)) foreach($object->fields as $key => $val) { $cssforfield=''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; + if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center'; elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center'; - if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; - elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right'; + + if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap'; + elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap'; + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield.=($cssforfield?' ':'').'right'; if (! empty($arrayfields['t.'.$key]['checked'])) { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 503a3995b93..60bfd1e5305 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6130,6 +6130,12 @@ abstract class CommonObject $value=price($value); } } + elseif ($type == 'real') + { + if (!empty($value)) { + $value=price($value); + } + } elseif ($type == 'boolean') { $checked='';