Some fixes to amounts.

This commit is contained in:
James Cole
2015-12-06 13:17:00 +01:00
parent 77262f52a4
commit 8f57c7dcb3
3 changed files with 31 additions and 28 deletions

View File

@@ -103,22 +103,6 @@ class ReportQuery implements ReportQueryInterface
);
}
$set = $query->get(['accounts.*']);
$set->each(
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 */
$account->startBalance = Steam::balance($account, $yesterday);
$account->endBalance = Steam::balance($account, $end);
}
);
return $set;
}