Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #4663
James Cole0ea22269a087
diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.phpindex 3a285c2c21..0ff12ae493 100644--- a/app/Services/Internal/Update/JournalUpdateService.php+++ b/app/Services/Internal/Update/JournalUpdateService.php@@ -292,7 +292,7 @@ class JournalUpdateService$validator->setTransactionType($expectedType);$validator->setUser($this->transactionJournal->user);$validator->source = $this->getValidSourceAccount();- $result = $validator->validateDestination($destId, $destName, null);+ $result = $validator->validateDestination($destId, $destName, null);Log::debug(sprintf('hasValidDestinationAccount(%d, "%s") will return %s', $destId, $destName, var_export($result, true)));// TODO typeOverrule: the account validator may have another opinion on the transaction type.@@ -527,6 +527,10 @@ class JournalUpdateServiceLog::debug('Will update budget.');$this->storeBudget($this->transactionJournal, new NullArrayObject($this->data));}+ // is transfer? remove budget+ if (TransactionType::TRANSFER === $this->transactionJournal->transactionType->type) {+ $this->transactionJournal->budgets()->sync([]);+ }}/**