New test for edit form that is more inclusive.

This commit is contained in:
James Cole
2015-04-03 09:30:44 +02:00
parent 72fc88f3c6
commit e3b11a9eb2
7 changed files with 99 additions and 7 deletions

View File

@@ -93,8 +93,9 @@ class AccountController extends Controller
// the opening balance is tricky:
$openingBalanceAmount = null;
if ($openingBalance) {
$transaction = $openingBalance->transactions()->where('account_id', $account->id)->first();
$transaction = $repository->getFirstTransaction($openingBalance, $account);
$openingBalanceAmount = $transaction->amount;
}