mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
use cases for rules tested.
This commit is contained in:
@@ -102,6 +102,9 @@ class SetDestinationAccount implements ActionInterface
|
||||
// update destination transaction with new destination account:
|
||||
// get destination transaction:
|
||||
$transaction = $journal->transactions()->where('amount', '>', 0)->first();
|
||||
if(null === $transaction) {
|
||||
return true;
|
||||
}
|
||||
$transaction->account_id = $this->newDestinationAccount->id;
|
||||
$transaction->save();
|
||||
$journal->touch();
|
||||
@@ -131,7 +134,7 @@ class SetDestinationAccount implements ActionInterface
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function findExpenseAccount()
|
||||
private function findExpenseAccount(): void
|
||||
{
|
||||
$account = $this->repository->findByName($this->action->action_value, [AccountType::EXPENSE]);
|
||||
if (null === $account) {
|
||||
|
||||
Reference in New Issue
Block a user