deleted order queue item

This commit is contained in:
Yan
2017-06-01 12:07:27 +06:30
parent 2d511cc63e
commit 2a323c8d0d
6 changed files with 29 additions and 36 deletions

View File

@@ -209,6 +209,7 @@ class Order < ApplicationRecord
def send_order_broadcast
#Send to background job for processing
OrderBroadcastJob.perform_later(self.id)
end
#Origami: Cashier : to view order type Table
def self.get_order_table
@@ -242,6 +243,5 @@ class Order < ApplicationRecord
left join order_items on order_items.order_id = orders.id")
.where("dining_facilities.is_active=?",true)
.group("orders.id")
>>>>>>> 47469cf466f1464fa4289e78c68b60e279174c60
end
end

View File

@@ -1,15 +0,0 @@
class OrderQueueItem < ApplicationRecord
belongs_to :order
belongs_to :order_queue_station
def self.add_order_item (order, item_code, order_queue_station )
order_queue_item = OrderQueueItem.new()
order_queue_item.order = order
order_queue_item.item_code = item_code
order_queue_item.order_queue_station = order_queue_station
order_queue_item.print_status = false
order_queue_item.delivery_status = false
order_queue_item.queue_status = true
order_queue_item.save
end
end

View File

@@ -23,8 +23,7 @@ class OrderQueueStation < ApplicationRecord
order_items.each do |order_item|
if (pq_item == order_item.item_code)
#Same Order_items can appear in two location.
AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
OrderQueueItem.add_order_item(order, order_item.item_code, oqs)
AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
end
end