This commit is contained in:
James Cole
2018-03-26 19:19:11 +02:00
parent 5ca31ea3dd
commit 413c1bc2fe
11 changed files with 26 additions and 19 deletions

View File

@@ -110,6 +110,13 @@ class LinkController extends Controller
}
$other = $this->journalRepository->find($linkInfo['transaction_journal_id']);
$alreadyLinked = $this->repository->findLink($journal, $other);
if($other->id === $journal->id) {
Session::flash('error', trans('firefly.journals_link_to_self'));
return redirect(route('transactions.show', [$journal->id]));
}
if ($alreadyLinked) {
Session::flash('error', trans('firefly.journals_error_linked'));