mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-04 22:01:05 +01:00
Fix timesheet merge into spreadsheet lost numbers
This commit is contained in:
parent
eb3ae5c887
commit
6bf48819bd
@ -1427,6 +1427,12 @@ abstract class Merge
|
||||
foreach($this->numeric_fields as $fieldname)
|
||||
{
|
||||
$names[] = preg_quote($fieldname, '/');
|
||||
$raw_placeholder = $this->prefix("", $fieldname . '_-raw-', '$');
|
||||
if(!array_key_exists($raw_placeholder, $replacements))
|
||||
{
|
||||
$replacements[$raw_placeholder] = $replacements[$this->prefix("", $fieldname, '$')];
|
||||
$replacements[$this->prefix("", $fieldname, '$')] = self::number_format($replacements[$raw_placeholder], 2, $this->mimetype);
|
||||
}
|
||||
}
|
||||
$this->format_spreadsheet_numbers($content, $names, $mimetype . $mso_application_progid);
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ class timesheet_merge extends Api\Storage\Merge
|
||||
'$$ts_duration$$',
|
||||
'$$ts_paused$$',
|
||||
'$$ts_quantity$$',
|
||||
'$$ts_unitprice$$'
|
||||
'$$ts_unitprice$$',
|
||||
'$$ts_total$$'
|
||||
);
|
||||
|
||||
/**
|
||||
@ -133,10 +134,6 @@ class timesheet_merge extends Api\Storage\Merge
|
||||
|
||||
$array = $record->get_record_array();
|
||||
$array['ts_total'] = $array['ts_quantity'] * $array['ts_unitprice'];
|
||||
foreach(array('ts_duration','ts_paused','ts_quantity','ts_unitprice','ts_total') as $key)
|
||||
{
|
||||
$array[$key] = self::number_format($array[$key],2,$this->mimetype);
|
||||
}
|
||||
|
||||
// Set any missing custom fields, or the marker will stay
|
||||
foreach(array_keys($this->bo->customfields) as $name)
|
||||
|
Loading…
Reference in New Issue
Block a user