change split bill process
This commit is contained in:
@@ -34,6 +34,8 @@ class Origami::RoomsController < 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
|
||||
@@ -43,6 +45,8 @@ class Origami::RoomsController < 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
|
||||
@@ -119,9 +123,9 @@ class Origami::RoomsController < BaseOrigamiController
|
||||
# end
|
||||
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user