Inventory Stock Check Print
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user