diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 2ef01ea1..d70ee8b0 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -120,10 +120,6 @@ class Origami::PaymentsController < BaseOrigamiController sale_payment = SalePayment.new sale_payment.process_payment(saleObj, current_user.name, cash, "cash") - type = 'payment' - from = getCloudDomain #get sub domain in cloud mode - ActionCable.server.broadcast "order_channel",table: table,type:type,from:from - rebate_amount = nil # For Cashier by Zone @@ -139,6 +135,10 @@ class Origami::PaymentsController < BaseOrigamiController table = DiningFacility.find(bookings[0].dining_facility_id) cashier_zone = CashierTerminalByZone.find_by_zone_id(table.zone_id) cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id) + + type = 'payment' + from = getCloudDomain #get sub domain in cloud mode + ActionCable.server.broadcast "order_channel",table: table,type:type,from:from else shift = ShiftSale.find(saleObj.shift_sale_id) cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)