replace @shop and shop_details with current_shop

This commit is contained in:
Zin Moe
2020-01-13 17:34:48 +06:30
parent f99defc459
commit a3edbb07fd
48 changed files with 72 additions and 72 deletions

View File

@@ -26,7 +26,7 @@ class Api::CallWaitersController < ActionController::API
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)
printer.print_call_waiter(print_settings,@table,@time,current_shop)
end

View File

@@ -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
shop = current_shop
if !shop.nil?
shop_code = shop.shop_code
order_audio = DisplayImage.find_by_shop_id_and_name(shop.id, "order_audio")

View File

@@ -47,7 +47,7 @@ class Api::OrdersController < Api::ApiController
# end
#
return @shop.to_json
return current_shop.to_json
end

View File

@@ -10,7 +10,7 @@ class Api::Payment::CallbackController < Api::ApiController
if trade_status == "PAY_SUCCESS"
merch_order_id = params[:Request][:merch_order_id]
status, filename, sale_receipt_no, printer_name = Payment.pay(getCloudDomain, cash, sale_id, member_info, type, tax_type, path, latest_order_no, shop_detail, current_user, 'kbzpay', merch_order_id)
status, filename, sale_receipt_no, printer_name = Payment.pay(getCloudDomain, cash, sale_id, member_info, type, tax_type, path, latest_order_no, current_shop, current_user, 'kbzpay', merch_order_id)
render json: JSON.generate({:status => status, :message => "Can't Rebate coz of Sever Error ", :filename => filename, :receipt_no => sale_receipt_no, :printer_name => printer_name})
end
end

View File

@@ -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
shop_detail = current_shop
# rounding adjustment
if !path.include? ("credit_payment")

View File

@@ -154,7 +154,7 @@ class Api::PaymentsController < Api::ApiController
other_amount = SaleItem.calculate_other_charges(sale_items)
printer = Printer::ReceiptPrinter.new(print_settings)
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil, cashier_terminal,sale_items,sale,params[:card_no], item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,@shop, 'Foodcourt',current_balance,card_data,other_amount,latest_order_no,card_balance_amount,nil,transaction_ref)
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings, false, nil, cashier_terminal,sale_items,sale,params[:card_no], item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,current_shop, 'Foodcourt',current_balance,card_data,other_amount,latest_order_no,card_balance_amount,nil,transaction_ref)
render json: JSON.generate({:status => true, :balance_amount => card_balance_amount,:receipt_no => sale.receipt_no,:order_no => latest_order_no, :message => "Payment successful."})
else

View File

@@ -2,7 +2,7 @@ class Api::SoundEffectController < Api::ApiController
#sound effect / alarm api for doemal side calling
def sound_effect
shop = @shop
shop = current_shop
if !shop.nil?
shop_code = shop.shop_code
order_audio = DisplayImage.find_by_shop_id_and_name(shop.id, "order_audio")