Cleaned up some tests and moved some methods.

This commit is contained in:
James Cole
2014-08-31 08:59:43 +02:00
parent 4cd955e5cf
commit 58b3334f05
8 changed files with 459 additions and 362 deletions

View File

@@ -86,7 +86,7 @@ class EloquentAccountRepository implements AccountRepositoryInterface
$accountIDs = array_unique($accountIDs);
if (count($accountIDs) > 0) {
// find the "initial balance" type accounts in this list. Should be just 1.
$query = \Auth::user()->accounts()->accountType(['Initial balance account'])
$query = \Auth::user()->accounts()->accountTypeIn(['Initial balance account'])
->whereIn('accounts.id', $accountIDs);
if ($query->count() == 1) {
$iba = $query->first(['accounts.*']);