|
|
@@ -121,7 +121,9 @@ class Product < ActiveRecord::Base
|
|
|
if self.buy_price != 0 && self.price != 0
|
|
|
rate = (( self.price.to_f - self.buy_price.to_f )/self.buy_price.to_f)*100
|
|
|
end
|
|
|
- return ((rate*100).round.to_f/100).to_s + "%"
|
|
|
+ value = bindings[:view].current_admin_user.id
|
|
|
+ #return ((rate*100).round.to_f/100).to_s + "%"
|
|
|
+ return value
|
|
|
end
|
|
|
|
|
|
rails_admin do
|
|
|
@@ -138,10 +140,7 @@ class Product < ActiveRecord::Base
|
|
|
strs=formatted_value{bindings[:view].current_admin_user.email}
|
|
|
end
|
|
|
end
|
|
|
-
|
|
|
- # puts strs
|
|
|
- debug(strs)
|
|
|
-
|
|
|
+ puts strs
|
|
|
|
|
|
filters [:id,:detail,:status,:name]
|
|
|
|
|
|
@@ -169,7 +168,7 @@ class Product < ActiveRecord::Base
|
|
|
#field :robo_balance_price
|
|
|
field :user_sale_price
|
|
|
# field :buy_price
|
|
|
- #field :gross_interest_rate
|
|
|
+ field :gross_interest_rate
|
|
|
field :count
|
|
|
field :recommend
|
|
|
field :status
|