Skip to content

Firefly III: a personal finances manager

Removed "amount" attribute. This breaks half of Firefly III.

James Colefa47eac9ff76
diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php
index f85a63d043..5f8c9a6387 100644
--- a/app/Models/TransactionJournal.php
+++ b/app/Models/TransactionJournal.php
@@ -97,30 +97,6 @@ class TransactionJournal extends Model
return $this->belongsToMany('FireflyIII\Models\Category');
}
- /**
- * @return float
- */
- public function getAmountAttribute()
- {
- $cache = new CacheProperties();
- $cache->addProperty($this->id);
- $cache->addProperty('amount');
- if ($cache->has()) {
- return $cache->get(); // @codeCoverageIgnore
- }
-
- bcscale(2);
- $transaction = $this->transactions->sortByDesc('amount')->first();
- $amount = $transaction->amount;
- if ($this->isWithdrawal()) {
- $amount = bcmul($amount, '-1');
- }
- $cache->store($amount);
-
- return $amount;
-
- }
-
/**
* @return string
*/