diff --git a/app/Models/Item/Item.php b/app/Models/Item/Item.php index 631a4e07d..9bfa68285 100644 --- a/app/Models/Item/Item.php +++ b/app/Models/Item/Item.php @@ -81,16 +81,6 @@ class Item extends Model $this->attributes['purchase_price'] = (float) $value; } - public function getConvertedAmount($format = false) - { - return $this->convert($this->amount, $this->currency_code, $this->currency_rate, $format); - } - - public function getReverseConvertedAmount($format = false) - { - return $this->reverseConvert($this->amount, $this->currency_code, $this->currency_rate, $format); - } - public function canDelete() { $error = false; diff --git a/app/Traits/Currencies.php b/app/Traits/Currencies.php index 2ddfced25..bee742369 100644 --- a/app/Traits/Currencies.php +++ b/app/Traits/Currencies.php @@ -54,6 +54,11 @@ trait Currencies return $this->convert($this->amount, $this->currency_code, $this->currency_rate, $format); } + public function getReverseConvertedAmount($format = false) + { + return $this->reverseConvert($this->amount, $this->currency_code, $this->currency_rate, $format); + } + public function getDynamicConvertedAmount($format = false) { return $this->dynamicConvert($this->default_currency_code, $this->amount, $this->currency_code, $this->currency_rate, $format);