mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-20 19:42:02 +00:00
Gokje.
This commit is contained in:
@@ -323,7 +323,7 @@ class ReportQuery implements ReportQueryInterface
|
|||||||
->groupBy('categories.id')
|
->groupBy('categories.id')
|
||||||
->orderBy('amount');
|
->orderBy('amount');
|
||||||
|
|
||||||
return $query->get(['categories.id', 'categories.name', DB::Raw('SUM(`transactions`.`amount`) AS `amount`')]);
|
return $query->get(['categories.id','categories.encrypted', 'categories.name', DB::Raw('SUM(`transactions`.`amount`) AS `amount`')]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,6 +11,7 @@ use Preferences;
|
|||||||
use Session;
|
use Session;
|
||||||
use Steam;
|
use Steam;
|
||||||
use View;
|
use View;
|
||||||
|
use Crypt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ReportController
|
* Class ReportController
|
||||||
@@ -267,6 +268,12 @@ class ReportController extends Controller
|
|||||||
$result = $this->query->journalsByCategory($start, $end);
|
$result = $this->query->journalsByCategory($start, $end);
|
||||||
$categories = Steam::makeArray($result);
|
$categories = Steam::makeArray($result);
|
||||||
|
|
||||||
|
// loop and decrypt if necessary:
|
||||||
|
foreach ($categories as $index => $category) {
|
||||||
|
$categories[$index]['name']
|
||||||
|
= intval($categories[$index]['encrypted']) == 1 ? Crypt::decrypt($categories[$index]['name']) : $categories[$index]['name'];
|
||||||
|
}
|
||||||
|
|
||||||
// all transfers
|
// all transfers
|
||||||
if ($showSharedReports === false) {
|
if ($showSharedReports === false) {
|
||||||
$result = $this->query->sharedExpensesByCategory($start, $end);
|
$result = $this->query->sharedExpensesByCategory($start, $end);
|
||||||
|
Reference in New Issue
Block a user