32 lines
1.7 KiB
Ruby
32 lines
1.7 KiB
Ruby
class Oqs::HomeController < BaseOqsController
|
|
def index
|
|
@queue_stations=OrderQueueStation.all
|
|
|
|
#sample Data
|
|
@queue_items_details = { :queue_id => 1, :order_id => 1, :station_name => 'Queue Station 1', :zone => 'Table4', :item_name => 'beef', :price => 10.00, :qty => 2, :customer => 'Wathon', :item_order_by => 'Yan', :created_at => '2007-05-17'}
|
|
# @queue_items_details = OrderItem.select("oqs as queue_id, oqs.station_name, oqs.is_active, oqpz.zone_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.created_at")
|
|
# .joins("join order_queue_process_by_zones as oqpz ON oqpz.order_queue_station_id = order_queue_items.order_queue_station_id")
|
|
# .joins("right join order_queue_stations as oqs ON oqs.id = order_queue_items.order_queue_station_id")
|
|
# .joins("right join orders as od ON od.id = order_queue_items.order_id")
|
|
# .joins("right join order_items as odt ON odt.item_code = order_queue_items.item_code")
|
|
# .order("odt.item_name DESC")
|
|
|
|
|
|
|
|
# Order.select("orders.id as order_id,sum(order_items.qty*order_items.price) as total_price,
|
|
# order_items.id as order_items_id,dining_facilities.name as table_name")
|
|
# .joins("left join booking_orders on booking_orders.order_id = orders.id
|
|
# left join bookings on bookings.id = booking_orders.id
|
|
# left join dining_facilities on dining_facilities.id = bookings.dining_facility_id
|
|
# left join order_items on order_items.order_id = orders.id")
|
|
# .where("dining_facilities.type=? and orders.order_type=? and dining_facilities.is_active=?",DiningFacility::TABLE_TYPE,"dine_in",true)
|
|
# .group("orders.id")
|
|
end
|
|
|
|
def show
|
|
end
|
|
end
|
|
|
|
|
|
|