accounts and discount updated

This commit is contained in:
Yan
2017-06-23 17:05:08 +06:30
parent 55c8ab80da
commit 3a0e26b2ea
14 changed files with 114 additions and 59 deletions

View File

@@ -18,14 +18,15 @@ class OrderQueueStation < ApplicationRecord
order_items = order.order_items
# get dining
booking = Booking.find_by_dining_facility_id(dining.id)
booking = Booking.find_by_dining_facility_id(dining.id)
#Assign OQS id to order Items
oqs_stations.each do |oqs|
oqs_stations.each do |oqs|
is_auto_printed = false
#Get List of items -
pq_items = JSON.parse(oqs.processing_items)
#Loop through the processing items
#Loop through the processing items
pq_items.each do |pq_item|
#Processing through the looping items
order_items.each do |order_item|
@@ -36,11 +37,13 @@ class OrderQueueStation < ApplicationRecord
# else
AssignedOrderItem.assigned_order_item(order, order_item.item_code, oqs)
# end
if oqs.auto_print
# end
# Auto Printing
if oqs.auto_print && is_auto_printed == false
print_slip(oqs, order, order_items)
end
is_auto_printed = true
end
end
end
end