mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Only withdrawal can have a budget.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user