|
|
@@ -103,6 +103,11 @@ class Order < ActiveRecord::Base
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+ def coupon_price_format
|
|
|
+ coupon_price_f = self.coupon_price!=0 ? ((self.coupon_price)/100.0) :0
|
|
|
+ return coupon_price_f.to_s
|
|
|
+ end
|
|
|
+
|
|
|
|
|
|
rails_admin do
|
|
|
navigation_label '商品管理'
|
|
|
@@ -147,6 +152,10 @@ class Order < ActiveRecord::Base
|
|
|
field :total_price_format do
|
|
|
visible true
|
|
|
end
|
|
|
+ field :total_price_format do
|
|
|
+ visible true
|
|
|
+ end
|
|
|
+ field :coupon_price_format
|
|
|
field :paied_price_format do
|
|
|
visible true
|
|
|
end
|
|
|
@@ -209,7 +218,7 @@ class Order < ActiveRecord::Base
|
|
|
value!=0 ? (value/100.0):0
|
|
|
end
|
|
|
end
|
|
|
- field :total_price_format
|
|
|
+ field :coupon_price_format
|
|
|
field :paied_price_format
|
|
|
field :buy_price
|
|
|
field :trade_no
|