Skip to content

Firefly III: a personal finances manager

Fixed a bug where deposits and/or transfers would be assigned budgets if you had selected a budget at the withdrawal screen earlier.

James Cole14b79cb0a4dc
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