mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup [skip ci]
This commit is contained in:
@@ -58,8 +58,8 @@ class LinkToBill implements ActionInterface
|
||||
/** @var BillRepositoryInterface $repository */
|
||||
$repository = app(BillRepositoryInterface::class);
|
||||
$repository->setUser($this->action->rule->user);
|
||||
$billName = (string)$this->action->action_value;
|
||||
$bill = $repository->findByName($billName);
|
||||
$billName = (string)$this->action->action_value;
|
||||
$bill = $repository->findByName($billName);
|
||||
|
||||
if (null !== $bill && $journal->transactionType->type === TransactionType::WITHDRAWAL) {
|
||||
$journal->bill()->associate($bill);
|
||||
|
@@ -101,8 +101,8 @@ class SetDestinationAccount implements ActionInterface
|
||||
|
||||
// update destination transaction with new destination account:
|
||||
// get destination transaction:
|
||||
$transaction = $journal->transactions()->where('amount', '>', 0)->first();
|
||||
if(null === $transaction) {
|
||||
$transaction = $journal->transactions()->where('amount', '>', 0)->first();
|
||||
if (null === $transaction) {
|
||||
return true;
|
||||
}
|
||||
$transaction->account_id = $this->newDestinationAccount->id;
|
||||
|
Reference in New Issue
Block a user