current shop

This commit is contained in:
Nweni
2019-12-03 14:54:53 +06:30
parent 23b5d0d344
commit 78838a7718
17 changed files with 44 additions and 43 deletions

View File

@@ -32,15 +32,15 @@ class Inventory::StockChecksController < BaseInventoryController
def save_to_journal
check = params[:data]
stockCheck = StockCheck.find_by_id_and_shop_code(check,@shop.shop_code)
stockCheck = StockCheck.find_by_id(check)
stockCheck.stock_check_items.each do |item|
StockJournal.from_stock_check(item,@shop)
StockJournal.from_stock_check(item,Shop.current_shop)
end
end
def print_stock_check
stock_id = params[:stock_check_id] # sale_id
stockcheck = StockCheck.find_by_id_and_shop_code(stock_id,@shop.shop_code)
stockcheck = StockCheck.find_by_id(stock_id)
stockcheck_items = stockcheck.stock_check_items
member_info = nil
unique_code = 'StockCheckPdf'