mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-27 17:31:09 -06:00
Fix balance thing.
This commit is contained in:
parent
83b169c6ef
commit
a349aac8a4
@ -131,8 +131,10 @@ class AccountController extends Controller
|
||||
$total = Auth::user()->accounts()->accountTypeIn($types)->count();
|
||||
|
||||
// last activity:
|
||||
$start = clone Session::get('start');
|
||||
$start->subDay();
|
||||
$set->each(
|
||||
function (Account $account) {
|
||||
function (Account $account) use($start) {
|
||||
$lastTransaction = $account->transactions()->leftJoin(
|
||||
'transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id'
|
||||
)->orderBy('transaction_journals.date', 'DESC')->first(['transactions.*', 'transaction_journals.date']);
|
||||
@ -141,7 +143,7 @@ class AccountController extends Controller
|
||||
} else {
|
||||
$account->lastActivityDate = null;
|
||||
}
|
||||
$account->startBalance = Steam::balance($account, Session::get('start'));
|
||||
$account->startBalance = Steam::balance($account, $start);
|
||||
$account->endBalance = Steam::balance($account, Session::get('end'));
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user