mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 20:22:07 +00:00
Fixed tests.
This commit is contained in:
@@ -223,28 +223,6 @@ class TransactionJournal extends Model
|
||||
return $this->hasMany('FireflyIII\Models\Transaction');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float
|
||||
*/
|
||||
public function getCorrectedActualAmountAttribute()
|
||||
{
|
||||
$amount = '0';
|
||||
$type = $this->transactionType->type;
|
||||
/** @var Transaction $t */
|
||||
foreach ($this->transactions as $t) {
|
||||
if ($t->amount > 0 && $type != 'Withdrawal') {
|
||||
$amount = $t->amount;
|
||||
break;
|
||||
}
|
||||
if ($t->amount < 0 && $type == 'Withdrawal') {
|
||||
$amount = $t->amount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @return array
|
||||
|
Reference in New Issue
Block a user