More refactoring.

This commit is contained in:
James Cole
2016-05-13 15:58:30 +02:00
parent 20e1e50032
commit 3e36a29c23
5 changed files with 6 additions and 173 deletions

View File

@@ -127,12 +127,6 @@ class HomeController extends Controller
$savingsTotal = bcadd($savingsTotal, Steam::balance($savingAccount, $end));
}
$sum = $repository->sumOfEverything();
if (bccomp($sum, '0') !== 0) {
Session::flash('error', strval(trans('firefly.unbalanced_error', ['amount' => Amount::format($sum, false)])));
}
foreach ($accounts as $account) {
$set = $repository->journalsInPeriod(new Collection([$account]), [], $start, $end);
$set = $set->splice(0, 10);

View File

@@ -169,7 +169,7 @@ class ReportController extends Controller
*/
if ($start->between($first, $last) || $end->between($first, $last)) {
$exists = true;
$journals = $repos->getJournalsInRange($account, $start, $end);
$journals = $repos->journalsInPeriod($accounts, [], $start, $end);
}
/*