|
@@ -117,7 +117,6 @@ class Product < ActiveRecord::Base
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
def gross_interest_rate
|
|
def gross_interest_rate
|
|
|
- controller = bindings[:controller]
|
|
|
|
|
rate = 0
|
|
rate = 0
|
|
|
if self.buy_price != 0 && self.price != 0
|
|
if self.buy_price != 0 && self.price != 0
|
|
|
rate = (( self.price.to_f - self.buy_price.to_f )/self.buy_price.to_f)*100
|
|
rate = (( self.price.to_f - self.buy_price.to_f )/self.buy_price.to_f)*100
|