mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixed the category chart.
This commit is contained in:
parent
ffb11b01a6
commit
003a05ee8d
@ -107,7 +107,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
->after($start)
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->groupBy('categories.id')
|
||||
->get(['categories.id as category_id', 'categories.encrypted', 'categories.name', 'transaction_journals.*']);
|
||||
->get(['categories.id as category_id', 'categories.encrypted as category_encrypted', 'categories.name', 'transaction_journals.*']);
|
||||
|
||||
$result = [];
|
||||
foreach ($set as $entry) {
|
||||
@ -115,7 +115,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
if (isset($result[$categoryId])) {
|
||||
$result[$categoryId]['sum'] += $entry->amount;
|
||||
} else {
|
||||
$isEncrypted = intval($entry->encrypted) == 1 ? true : false;
|
||||
$isEncrypted = intval($entry->category_encrypted) == 1 ? true : false;
|
||||
$name = strlen($entry->name) == 0 ? trans('firefly.noCategory') : $entry->name;
|
||||
$name = $isEncrypted ? Crypt::decrypt($name) : $name;
|
||||
$result[$categoryId] = [
|
||||
|
Loading…
Reference in New Issue
Block a user