change split bill process

This commit is contained in:
phyusin
2018-02-14 14:14:53 +06:30
parent 13ab1ff5be
commit f19fb769f6
9 changed files with 133 additions and 76 deletions

View File

@@ -38,6 +38,8 @@ class Origami::HomeController < BaseOrigamiController
if !order.order_items.empty?
if !@order_items_count.key?(booking.dining_facility_id)
@order_items_count.store(booking.dining_facility_id, order.order_items.count)
else
@order_items_count[booking.dining_facility_id] += order.order_items.count
end
end
end
@@ -47,6 +49,8 @@ class Origami::HomeController < BaseOrigamiController
if sale.sale_status !='completed'
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
end
end
end
@@ -116,9 +120,9 @@ class Origami::HomeController < BaseOrigamiController
@checkout_alert_time = Lookup.collection_of('checkout_alert_time')
#for split bill
lookup_spit_bill = Lookup.collection_of('split_bill')
@spit_bill = 0
@split_bill = 0
if !lookup_spit_bill[0].nil?
@spit_bill = lookup_spit_bill[0][1]
@split_bill = lookup_spit_bill[0][1]
end
end