From 47bebb614e588059f20dcf3047629662ec59300a Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 5 Nov 2016 07:43:23 +0100 Subject: [PATCH] Only withdrawal can have a budget. --- app/Repositories/Journal/JournalRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 5d81adf1a6..6b3e476b50 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -458,7 +458,7 @@ class JournalRepository implements JournalRepositoryInterface */ private function storeBudgetWithJournal(TransactionJournal $journal, int $budgetId) { - if (intval($budgetId) > 0 && $journal->transactionType->type !== TransactionType::TRANSFER) { + if (intval($budgetId) > 0 && $journal->transactionType->type === TransactionType::WITHDRAWAL) { /** @var \FireflyIII\Models\Budget $budget */ $budget = Budget::find($budgetId); $journal->budgets()->save($budget);