Can no longer set a budget to an expense.

This commit is contained in:
James Cole 2018-08-09 20:49:30 +02:00
parent 51b11e5188
commit b1b13d3696
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 10 additions and 2 deletions

View File

@ -150,7 +150,15 @@ class JournalUpdateService
foreach ($journal->transactions as $transaction) {
$service->updateBudget($transaction, $budgetId);
}
return $journal;
}
// clear budget.
/** @var Transaction $transaction */
foreach ($journal->transactions as $transaction) {
$transaction->budgets()->sync([]);
}
// remove budgets from journal:
$journal->budgets()->sync([]);
return $journal;
}

View File

@ -126,7 +126,7 @@ class ProfileControllerTest extends TestCase
}
/**
* @covers \FireflyIII\Http\Controllers\ProfileControllerAccount
* @covers \FireflyIII\Http\Controllers\ProfileController
*/
public function testDeleteAccount(): void
{
@ -141,7 +141,7 @@ class ProfileControllerTest extends TestCase
}
/**
* @covers \FireflyIII\Http\Controllers\ProfileControllerCode
* @covers \FireflyIII\Http\Controllers\ProfileController
*/
public function testDeleteCode(): void
{