From cf8b4e2f76ecbd14943d853c6e680e5e1076da87 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 19 Mar 2016 17:34:02 +0100 Subject: [PATCH] Quick bug fix. --- app/Repositories/Account/AccountRepository.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 43a0f71e25..abec955c05 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -354,6 +354,9 @@ class AccountRepository implements AccountRepositoryInterface ->transactionTypes([TransactionType::OPENING_BALANCE]) ->orderBy('created_at', 'ASC') ->first(['transaction_journals.*']); + if(is_null($journal)) { + return new TransactionJournal; + } return $journal; }