mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix method to return object, not key.
This commit is contained in:
parent
deebdd86a6
commit
b747c50aa3
@ -77,15 +77,15 @@ class TransactionJournal extends Model
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($this->transactions()->get() as $transaction) {
|
||||
if (floatval($transaction->amount) > 0 && $positive === true) {
|
||||
return $transaction->account_id;
|
||||
return $transaction->account;
|
||||
}
|
||||
if (floatval($transaction->amount) < 0 && $positive === false) {
|
||||
return $transaction->account_id;
|
||||
return $transaction->account;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $this->transactions()->first()->account_id;
|
||||
return $this->transactions()->first();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user