shop code
This commit is contained in:
@@ -7,7 +7,7 @@ class Api::BillController < Api::ApiController
|
||||
@status = false
|
||||
@error_message = "Order ID or Booking ID is require to request for a bill."
|
||||
# if shift_by_terminal = ShiftSale.current_open_shift(get_cashier[0].id)
|
||||
if !ShiftSale.current_shift(Shop.current_shop.shop_code).nil?
|
||||
if !ShiftSale.current_shift(@shop.shop_code).nil?
|
||||
#create Bill by Booking ID
|
||||
table = 0
|
||||
if (params[:booking_id])
|
||||
@@ -107,7 +107,7 @@ class Api::BillController < Api::ApiController
|
||||
|
||||
# unique_code = "ReceiptBillPdf"
|
||||
# #shop detail
|
||||
# shop_details = Shop.current_shop
|
||||
# shop_details = @shop
|
||||
|
||||
# customer= Customer.find(@sale_data.customer_id)
|
||||
# # get member information
|
||||
|
||||
@@ -23,9 +23,7 @@ class Api::CallWaitersController < ActionController::API
|
||||
end
|
||||
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time,from: from, shift_ids: shift_ids
|
||||
# get printer info
|
||||
|
||||
@shop = Shop.current_shop
|
||||
unique_code = "CallWaiterPdf"
|
||||
unique_code = "CallWaiterPdf"
|
||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
printer.print_call_waiter(print_settings,@table,@time,@shop)
|
||||
|
||||
@@ -70,7 +70,7 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
|
||||
order_reservation_id, flag = OrderReservation.addOrderReservationInfo(order_reservation)
|
||||
|
||||
if !order_reservation_id.nil? && flag
|
||||
shop = Shop.current_shop
|
||||
shop = @shop
|
||||
if !shop.nil?
|
||||
shop_code = shop.shop_code
|
||||
order_audio = DisplayImage.find_by_shop_id_and_name(shop.id, "order_audio")
|
||||
|
||||
@@ -46,7 +46,7 @@ class Api::OrdersController < Api::ApiController
|
||||
@tax_profile = TaxProfile.where("lower(group_type)='cashier'")
|
||||
# end
|
||||
|
||||
@shop = Shop.current_shop
|
||||
#
|
||||
return @shop.to_json
|
||||
end
|
||||
|
||||
@@ -62,7 +62,7 @@ class Api::OrdersController < Api::ApiController
|
||||
def create
|
||||
Rails.logger.debug "Order Source - " + params[:order_source].to_s
|
||||
Rails.logger.debug "Table ID - " + params[:table_id].to_s
|
||||
# @shop = Shop.find_by_shop_code(params[:shop_code])
|
||||
@shop = Shop.find_by_shop_code(params[:shop_code])
|
||||
current_shift = ShiftSale.current_shift
|
||||
if current_shift.nil?
|
||||
@status = false
|
||||
@@ -109,7 +109,7 @@ class Api::OrdersController < Api::ApiController
|
||||
@order.new_booking = true
|
||||
@order.waiters = current_login_employee.name
|
||||
@order.employee_name = current_login_employee.name
|
||||
@order.shop_code = Shop.current_shop.shop_code
|
||||
@order.shop_code = @shop.shop_code
|
||||
@order.is_extra_time = is_extra_time
|
||||
@order.extra_time = extra_time
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class Api::Payment::MobilepaymentController < Api::ApiController
|
||||
saleObj = Sale.find(sale_id)
|
||||
sale_items = SaleItem.get_all_sale_items(sale_id)
|
||||
|
||||
shop_detail = Shop.current_shop
|
||||
shop_detail = @shop
|
||||
|
||||
# rounding adjustment
|
||||
if !path.include? ("credit_payment")
|
||||
|
||||
@@ -2,7 +2,7 @@ class Api::SoundEffectController < Api::ApiController
|
||||
|
||||
#sound effect / alarm api for doemal side calling
|
||||
def sound_effect
|
||||
shop = Shop.current_shop
|
||||
shop = @shop
|
||||
if !shop.nil?
|
||||
shop_code = shop.shop_code
|
||||
order_audio = DisplayImage.find_by_shop_id_and_name(shop.id, "order_audio")
|
||||
|
||||
@@ -16,7 +16,7 @@ class Api::SurveyController < Api::ApiController
|
||||
def create
|
||||
dining_facility = DiningFacility.find(params[:id])
|
||||
open_cashier = Employee.where("role = 'cashier' AND token_session <> ''")
|
||||
current_shift = ShiftSale.current_shift(Shop.current_shop.shop_code)
|
||||
current_shift = ShiftSale.current_shift(@shop.shop_code)
|
||||
current_shift_user =Employee.find_by_id(current_shift.employee_id)
|
||||
if open_cashier.count>0
|
||||
shift_by_terminal = ShiftSale.current_open_shift(open_cashier[0])
|
||||
|
||||
Reference in New Issue
Block a user