Fix ExportReportResults (#3506)
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
This commit is contained in:
parent
bfd13719c9
commit
5f5a1a6740
1 changed files with 11 additions and 1 deletions
|
|
@ -65,7 +65,17 @@ class ExportReportResults extends Job
|
|||
foreach ($totals as $currencyId => $each) {
|
||||
foreach ($each as $dimension => $val) {
|
||||
$tmp = [];
|
||||
$tmp[] = Utils::getFromCache($currencyId, 'currencies')->name . (($dimension) ? ' - ' . $dimension : '');
|
||||
|
||||
$currency = Utils::getFromCache($currencyId, 'currencies');
|
||||
if (!$currency) {
|
||||
$name = $currencyId;
|
||||
$account = $this->user->account->first();
|
||||
$currencyId = $account->currency_id;
|
||||
} else {
|
||||
$name = $currency->name;
|
||||
}
|
||||
|
||||
$tmp[] = $dimension ? $name . ' - ' . $dimension : $name;
|
||||
foreach ($val as $field => $value) {
|
||||
if ($field == 'duration') {
|
||||
$tmp[] = Utils::formatTime($value);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue