Explorar el Código

add auto take cash function

abiao hace 4 años
padre
commit
7d3be1d83b
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      app/models/order_detail.rb

+ 2 - 1
app/models/order_detail.rb

@@ -70,8 +70,9 @@ class OrderDetail < ActiveRecord::Base
         end
       end
       field :paid_time do
+        paidtime=bindings[:object].order.paied_at
         formatted_value do
-          (value == 0 || value == nil) ? Time.at(0) : Time.at(value)
+              (paidtime == 0 || paidtime == nil) ? Time.at(0) : Time.at(paidtime)
         end
       end
       field :pay_way, :enum do