mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-22 08:56:39 -06:00
Make sure transfers can't get a budget.
This commit is contained in:
parent
c2dfbcba10
commit
e97283b34b
@ -26,6 +26,7 @@ namespace FireflyIII\Factory;
|
||||
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Services\Internal\Support\TransactionServiceTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
@ -124,6 +125,11 @@ class TransactionFactory
|
||||
}
|
||||
|
||||
// set budget:
|
||||
if ($journal->transactionType->type === TransactionType::TRANSFER) {
|
||||
$data['budget_id'] = null;
|
||||
$data['budget_name'] = null;
|
||||
}
|
||||
|
||||
$budget = $this->findBudget($data['budget_id'], $data['budget_name']);
|
||||
$this->setBudget($source, $budget);
|
||||
$this->setBudget($dest, $budget);
|
||||
|
Loading…
Reference in New Issue
Block a user