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

@@ -19,7 +19,7 @@ class Inventory::StockChecksController < BaseInventoryController
item_list = JSON.parse(params[:stock_item])
reason = params[:reason]
check = StockCheck.new
@check = check.create(current_user, reason, item_list,@shop)
@check = check.create(current_user, reason, item_list,current_shop)
end
def show
@@ -33,7 +33,7 @@ class Inventory::StockChecksController < BaseInventoryController
check = params[:data]
stockCheck = StockCheck.find_by_id(check)
stockCheck.stock_check_items.each do |item|
StockJournal.from_stock_check(item,@shop)
StockJournal.from_stock_check(item,current_shop)
end
end
@@ -49,7 +49,7 @@ class Inventory::StockChecksController < BaseInventoryController
print_settings = PrintSetting.find_by_unique_code(unique_code)
if !print_settings.nil?
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_stock_check_result(print_settings, stockcheck, stockcheck_items, checker.name, @shop)
printer.print_stock_check_result(print_settings, stockcheck, stockcheck_items, checker.name, current_shop)
end
end