From 14b79cb0a4dc406f1b1064a5890e68665ba36421 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 17 Jul 2015 21:03:13 +0200 Subject: [PATCH] Fixed a bug where deposits and/or transfers would be assigned budgets if you had selected a budget at the withdrawal screen earlier. --- app/Http/Controllers/TransactionController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 647602e09b..8744038427 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -260,6 +260,12 @@ class TransactionController extends Controller { $journalData = $request->getJournalData(); + + // if not withdrawal, unset budgetid. + if($journalData['what'] != 'withdrawal') { + $journalData['budget_id'] = 0; + } + $journal = $repository->store($journalData); // rescan journal, UpdateJournalConnection