Format numbers according to user preferences

This commit is contained in:
Nathan Gray 2011-02-28 20:35:50 +00:00
parent e81802d0cd
commit a28c004536

View File

@ -100,8 +100,12 @@ class timesheet_merge extends bo_merge
} }
importexport_export_csv::convert($record, $types, 'timesheet', $selects); importexport_export_csv::convert($record, $types, 'timesheet', $selects);
// Set any missing custom fields, or the marker will stay
$array = $record->get_record_array(); $array = $record->get_record_array();
foreach(array('ts_duration','ts_quantity','ts_unitprice') as $key)
{
$array[$key] = self::number_format($array[$key],2,$this->mimetype);
}
// Set any missing custom fields, or the marker will stay
foreach($this->bo->customfields as $name => $field) foreach($this->bo->customfields as $name => $field)
{ {
if(!$array['#'.$name]) $array['#'.$name] = ''; if(!$array['#'.$name]) $array['#'.$name] = '';