Remove cash accounts from list [skip ci]

This commit is contained in:
James Cole 2015-05-20 20:04:27 +02:00
parent 8f104d555a
commit 0e6677ccb3

View File

@ -62,6 +62,13 @@ class ReportHelper implements ReportHelperInterface
$end = 0; $end = 0;
$diff = 0; $diff = 0;
// remove cash account, if any:
$accounts =$accounts->filter(function(Account $account) {
if($account->accountType->type != 'Cash account') {
return $account;
}
});
// summarize: // summarize:
foreach ($accounts as $account) { foreach ($accounts as $account) {
$start += $account->startBalance; $start += $account->startBalance;