Move some stuff around.

This commit is contained in:
James Cole
2016-03-02 19:41:22 +01:00
parent 2fd476ada8
commit 5b949d6e00
4 changed files with 19 additions and 11 deletions

View File

@@ -144,6 +144,7 @@ class TransactionController extends Controller
// get journal again:
/** @var TransactionJournal $journal */
$journal = TransactionJournal::expanded()->where('transaction_journals.id', $journal->id)->first(TransactionJournal::QUERYFIELDS);
// TODO REMOVE this in favour of something static in TransactionJournal.
// cannot edit opening balance
if ($journal->isOpeningBalance()) {
throw new FireflyException('Cannot edit this transaction (#' . $journal->id . '). Edit the account instead!');