diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 60ce3b02..0e6709d8 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -480,9 +480,16 @@ class Origami::PaymentsController < BaseOrigamiController sale_payment = SalePayment.new sale_payment.process_payment(saleObj, current_user.name, cash, "foc" ,remark) - type = 'payment' - from = getCloudDomain #get sub domain in cloud mode - ActionCable.server.broadcast "order_channel",table: table,type:type,from:from + + bookings = Booking.where("sale_id='#{sale_id}'") + if bookings[0].dining_facility_id.to_i > 0 + table = DiningFacility.find(bookings[0].dining_facility_id) + type = 'payment' + from = getCloudDomain #get sub domain in cloud mode + ActionCable.server.broadcast "order_channel",table: table,type:type,from:from + end + + # For Cashier by Zone bookings = Booking.where("sale_id='#{sale_id}'")