update add extra time

This commit is contained in:
Aung Myo
2018-01-02 12:30:57 +06:30
parent 26a11ebecd
commit b1fa5f1518
6 changed files with 54 additions and 27 deletions

View File

@@ -114,7 +114,10 @@ class Sale < ApplicationRecord
order.save
booking.sale_id = self.id
booking.checkout_at = Time.now.utc.getlocal
if booking.checkout_at < Time.now.utc.getlocal
booking.checkout_at = Time.now.utc.getlocal
end
booking.checkout_by = requested_by.name
booking.save
@@ -222,8 +225,6 @@ class Sale < ApplicationRecord
sales_items.each do |item|
#compute each item and added to total
puts "item.sales_item_id ddd"
puts item.sale_item_id
subtotal_price = subtotal_price + item.price
# only calc tax when true