update request bill with booking.checkout_at nil4

This commit is contained in:
Aung Myo
2018-01-02 15:36:03 +06:30
parent 9f5525ef68
commit e27b468db1

View File

@@ -114,8 +114,10 @@ class Sale < ApplicationRecord
order.save
booking.sale_id = self.id
if booking.checkout_at < Time.now.utc.getlocal
booking.checkout_at = Time.now.utc.getlocal
if !booking.checkout_at.nil?
if booking.checkout_at < Time.now.utc.getlocal
booking.checkout_at = Time.now.utc.getlocal
end
end
booking.checkout_by = requested_by.name