mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-28 09:51:21 -06:00
Check if entries have an encrypted description and act accordingly.
This commit is contained in:
parent
37fe79944f
commit
2998382969
@ -281,7 +281,8 @@ class GoogleChartController extends BaseController
|
||||
$unpaid['items'][] = $entry->name;
|
||||
$unpaid['amount'] += floatval($entry->averageAmount);
|
||||
} else {
|
||||
$paid['items'][] = $entry->description;
|
||||
$description = intval($entry->encrypted) == 1 ? Crypt::decrypt($entry->description) : $entry->description;
|
||||
$paid['items'][] = $description;
|
||||
$paid['amount'] += floatval($entry->actualAmount);
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ class Chart implements ChartInterface
|
||||
->groupBy('bills.id')
|
||||
->get(
|
||||
['bills.id', 'bills.name', 'transaction_journals.description',
|
||||
'transaction_journals.encrypted',
|
||||
'transaction_journals.id as journalId',
|
||||
\DB::Raw('SUM(`bills`.`amount_min` + `bills`.`amount_max`) / 2 as `averageAmount`'),
|
||||
'transactions.amount AS actualAmount']
|
||||
|
Loading…
Reference in New Issue
Block a user