oqs sample
This commit is contained in:
@@ -8,7 +8,7 @@ class OrderQueueStation < ApplicationRecord
|
||||
|
||||
scope :active, -> {where(is_active: true)}
|
||||
|
||||
def process_order (order)
|
||||
def process_order (order)
|
||||
oqs_stations = OrderQueueStation.active
|
||||
|
||||
order_items = order.order_items
|
||||
@@ -20,10 +20,11 @@ class OrderQueueStation < ApplicationRecord
|
||||
#Loop through the processing items
|
||||
pq_items.each do |pq_item|
|
||||
#Processing through the looping items
|
||||
order_items.each do |order_item|
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user