updated for bill print

This commit is contained in:
Yan
2017-06-06 14:34:24 +06:30
parent dcb8217824
commit d28449a9c9
3 changed files with 8 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
class Origami::RequestBillsController < BaseOrigamiController
def create
def show
@sale = Sale.new
@@ -26,12 +26,4 @@ class Origami::RequestBillsController < BaseOrigamiController
end
def show
sale_id = params[:sale_id]
if Sale.exists?(sale_id)
@sale_data = Sale.find_by_id(sale_id)
end
end
end

View File

@@ -69,7 +69,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
#Generate PDF
#Print
pdf = ReceiptBillPdf.new(printer_settings,sale_items,sale,sale_data)
pdf.render_file "tmp/receipt_bill.pdf"
pdf.render_file "tmp/receipt_bill.pdf"
self.print("tmp/receipt_bill.pdf")
end
end