fix foodcourt sales transaction
This commit is contained in:
14
app/jobs/print_order_queue_job.rb
Normal file
14
app/jobs/print_order_queue_job.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class PrintOrderQueueJob < ApplicationJob
|
||||
queue_as :default
|
||||
|
||||
def perform(shop_code, booking_id)
|
||||
current_shop = Shop.find_by(shop_code: shop_code)
|
||||
ActsAsTenant.with_tenant(current_shop) do
|
||||
booking = Booking.find(booking_id)
|
||||
booking.orders.each do |order|
|
||||
oqs = OrderQueueStation.new
|
||||
oqs.process_order(order, booking.dining_facility_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user