mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
See code. [skip ci]
This commit is contained in:
parent
0766bb31fe
commit
a07c1e3c71
@ -150,8 +150,16 @@ class ReportQuery implements ReportQueryInterface
|
|||||||
$set = $query->get(['accounts.*']);
|
$set = $query->get(['accounts.*']);
|
||||||
$set->each(
|
$set->each(
|
||||||
function (Account $account) use ($start, $end) {
|
function (Account $account) use ($start, $end) {
|
||||||
|
/**
|
||||||
|
* The balance for today always incorporates transactions
|
||||||
|
* made on today. So to get todays "start" balance, we sub one
|
||||||
|
* day.
|
||||||
|
*/
|
||||||
|
$yesterday = clone $start;
|
||||||
|
$yesterday->subDay();
|
||||||
|
|
||||||
/** @noinspection PhpParamsInspection */
|
/** @noinspection PhpParamsInspection */
|
||||||
$account->startBalance = Steam::balance($account, $start);
|
$account->startBalance = Steam::balance($account, $yesterday);
|
||||||
$account->endBalance = Steam::balance($account, $end);
|
$account->endBalance = Steam::balance($account, $end);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user