Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into quick_service

This commit is contained in:
Aung Myo
2018-02-16 09:51:51 +06:30
7 changed files with 25 additions and 13 deletions

View File

@@ -13,9 +13,9 @@ class Origami::OrdersController < BaseOrigamiController
end
end
@order_items_count = Hash.new
bookings = Booking.all
if !bookings.nil?
@order_items_count = Hash.new
bookings.each do |booking|
if booking.sale_id.nil? && booking.booking_status != 'moved'
if !booking.booking_orders.empty?
@@ -37,7 +37,7 @@ class Origami::OrdersController < BaseOrigamiController
if !@order_items_count.key?(booking.dining_facility_id)
@order_items_count.store(booking.dining_facility_id, sale.sale_items.count)
else
@order_items_count[booking.dining_facility_id] += sale.sale_items.count
@order_items_count[booking.dining_facility_id] = sale.sale_items.count
end
end
end