Inventory Stock Check Print

This commit is contained in:
Nweni
2017-08-31 15:29:36 +06:30
parent 65675a6683
commit 12c8be597d
6 changed files with 128 additions and 3 deletions

View File

@@ -22,7 +22,23 @@ class Inventory::StockChecksController < BaseInventoryController
StockJournal.from_stock_check(item)
end
end
def print_stock_check
stock_id = params[:stock_check_id] # sale_id
stockcheck = StockCheck.find(stock_id)
stockcheck_items = stockcheck.stock_check_items
member_info = nil
unique_code = "StockPrint"
shop_details = Shop.find(1)
checker = Employee.find(stockcheck.check_by)
print_settings=PrintSetting.find_by_unique_code(unique_code)
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_stock_check_result(print_settings,stockcheck, stockcheck_items,checker.name, shop_details)
end
# before_action :set_stock_check, only: [:show, :edit, :update, :destroy]
# GET /stock_checks