mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -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['items'][] = $entry->name;
|
||||||
$unpaid['amount'] += floatval($entry->averageAmount);
|
$unpaid['amount'] += floatval($entry->averageAmount);
|
||||||
} else {
|
} else {
|
||||||
$paid['items'][] = $entry->description;
|
$description = intval($entry->encrypted) == 1 ? Crypt::decrypt($entry->description) : $entry->description;
|
||||||
|
$paid['items'][] = $description;
|
||||||
$paid['amount'] += floatval($entry->actualAmount);
|
$paid['amount'] += floatval($entry->actualAmount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ class Chart implements ChartInterface
|
|||||||
->groupBy('bills.id')
|
->groupBy('bills.id')
|
||||||
->get(
|
->get(
|
||||||
['bills.id', 'bills.name', 'transaction_journals.description',
|
['bills.id', 'bills.name', 'transaction_journals.description',
|
||||||
|
'transaction_journals.encrypted',
|
||||||
'transaction_journals.id as journalId',
|
'transaction_journals.id as journalId',
|
||||||
\DB::Raw('SUM(`bills`.`amount_min` + `bills`.`amount_max`) / 2 as `averageAmount`'),
|
\DB::Raw('SUM(`bills`.`amount_min` + `bills`.`amount_max`) / 2 as `averageAmount`'),
|
||||||
'transactions.amount AS actualAmount']
|
'transactions.amount AS actualAmount']
|
||||||
|
Loading…
Reference in New Issue
Block a user