diff --git a/app/controllers/origami/orders_controller.rb b/app/controllers/origami/orders_controller.rb index 85047ef0..22a1e802 100755 --- a/app/controllers/origami/orders_controller.rb +++ b/app/controllers/origami/orders_controller.rb @@ -3,7 +3,7 @@ class Origami::OrdersController < BaseOrigamiController @tables = Table.all.active.order('status desc') @rooms = Room.all.active.order('status desc') @complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d')) - @orders = Order.all.order('status desc') + @orders = Order.where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed'",DateTime.now.strftime('%Y-%m-%d')).order('date desc') @order = Order.find(params[:order_id]) sale_order = SaleOrder.find_by_order_id(@order.order_id) if sale_order diff --git a/app/controllers/origami/rooms_controller.rb b/app/controllers/origami/rooms_controller.rb index bd375d63..d2c89e37 100755 --- a/app/controllers/origami/rooms_controller.rb +++ b/app/controllers/origami/rooms_controller.rb @@ -11,7 +11,7 @@ class Origami::RoomsController < BaseOrigamiController @tables = Table.all.active.order('status desc') @rooms = Room.all.active.order('status desc') @complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d')) - @orders = Order.all.order('date desc') + @orders = Order.where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed'",DateTime.now.strftime('%Y-%m-%d')).order('date desc') @room = DiningFacility.find(params[:room_id]) @@ -90,6 +90,12 @@ class Origami::RoomsController < BaseOrigamiController # end # end # end + + lookup_spit_bill = Lookup.collection_of('split_bill') + @spit_bill = 0 + if !lookup_spit_bill[0].nil? + @spit_bill = lookup_spit_bill[0][1] + end end diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 64aa00ff..7f16833e 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -116,7 +116,22 @@ <% @orders.each do |order| %>