Commit 326c0cb3 by ivan Lan

Fix callback

parent 98793756
...@@ -94,20 +94,19 @@ module Shotengai ...@@ -94,20 +94,19 @@ module Shotengai
end end
def set_pay_time def set_pay_time
self.pay_time = Time.now self.update!(pay_time: Time.now)
end end
def set_delivery_time def set_delivery_time
self.delivery_time = Time.now update!(delivery_time: Time.now)
end end
def set_receipt_time def set_receipt_time
self.receipt_time = Time.now update!(receipt_time: Time.now)
end end
def set_seq def set_seq
# self.update_without_callbacks!(seq: create_seq) self.update!(seq: create_seq)
self.seq = create_seq
end end
def create_seq def create_seq
...@@ -118,7 +117,7 @@ module Shotengai ...@@ -118,7 +117,7 @@ module Shotengai
end end
def set_amount def set_amount
self.amount = (product_amount + delivery_cost).round(2) self.update!(amount: (product_amount + delivery_cost).round(2))
end end
def amount def amount
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment