mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Make budget tables multi-currency
This commit is contained in:
@@ -182,10 +182,8 @@ class BillRepository implements BillRepositoryInterface
|
||||
*/
|
||||
public function getBillsForAccounts(Collection $accounts): Collection
|
||||
{
|
||||
$fields = ['bills.id', 'bills.created_at', 'bills.updated_at', 'bills.deleted_at', 'bills.user_id', 'bills.name', 'bills.match', 'bills.amount_min',
|
||||
'bills.amount_max', 'bills.date', 'bills.transaction_currency_id', 'bills.repeat_freq', 'bills.skip', 'bills.automatch', 'bills.active',
|
||||
'bills.name_encrypted',
|
||||
'bills.match_encrypted',];
|
||||
$fields = ['bills.id', 'bills.created_at', 'bills.updated_at', 'bills.deleted_at', 'bills.user_id', 'bills.name', 'bills.amount_min',
|
||||
'bills.amount_max', 'bills.date', 'bills.transaction_currency_id', 'bills.repeat_freq', 'bills.skip', 'bills.automatch', 'bills.active',];
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
$set = $this->user->bills()
|
||||
->leftJoin(
|
||||
@@ -206,7 +204,6 @@ class BillRepository implements BillRepositoryInterface
|
||||
->orderBy('bills.name', 'ASC')
|
||||
->groupBy($fields)
|
||||
->get($fields);
|
||||
|
||||
return $set;
|
||||
}
|
||||
|
||||
@@ -457,7 +454,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
$currentStart = clone $nextExpectedMatch;
|
||||
}
|
||||
$simple = $set->each(
|
||||
function (Carbon $date) {
|
||||
static function (Carbon $date) {
|
||||
return $date->format('Y-m-d');
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user