oqs updated
This commit is contained in:
@@ -16,6 +16,9 @@ class OrderQueueStation < ApplicationRecord
|
||||
oqpbz = OrderQueueProcessByZone.find_by_zone_id(dining.zone_id)
|
||||
|
||||
order_items = order.order_items
|
||||
|
||||
# get dining
|
||||
booking = Booking.find_by_dining_facility_id(dining.id)
|
||||
|
||||
#Assign OQS id to order Items
|
||||
oqs_stations.each do |oqs|
|
||||
@@ -31,9 +34,7 @@ class OrderQueueStation < ApplicationRecord
|
||||
# #Same Order_items can appear in two location.
|
||||
# AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||
# else
|
||||
puts pq_item
|
||||
puts order_item.item_code
|
||||
puts oqs.station_name
|
||||
|
||||
AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
|
||||
# end
|
||||
|
||||
@@ -49,11 +50,11 @@ class OrderQueueStation < ApplicationRecord
|
||||
private
|
||||
#Print order_items in 1 slip
|
||||
def print_slip(oqs, order, order_items)
|
||||
unique_code="OrderSummaryPdf"
|
||||
unique_code="OrderSummaryPdf"
|
||||
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
order_queue_printer= Printer::OrderQueuePrinter.new(print_settings)
|
||||
order_queue_printer.print_order_summary(oqs,order.order_id)
|
||||
order_queue_printer.print_order_summary(oqs,order.order_id, print_status="")
|
||||
|
||||
AssignedOrderItem.where("order_id = '#{ order.order_id }'").find_each do |ai|
|
||||
# update print status for order items
|
||||
@@ -70,7 +71,7 @@ class OrderQueueStation < ApplicationRecord
|
||||
# print when complete click
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
order_queue_printer= Printer::OrderQueuePrinter.new(print_settings)
|
||||
order_queue_printer.print_order_item(oqs,item.order_id, item.item_code )
|
||||
order_queue_printer.print_order_item(oqs,item.order_id, item.item_code, print_status="" )
|
||||
|
||||
# update print status for completed same order items
|
||||
assigned_order_item.each do |ai|
|
||||
|
||||
Reference in New Issue
Block a user