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

View File

@@ -137,3 +137,9 @@ admin_employee = Employee.create({name: "Administrator", role: "Administrator",
#Account for Menu Item Type (eg: Food, Beverage)
food = Account.create({title: "Food", account_type: "0"})
beverage = Account.create({title: "Beverage", account_type: "1"})
shop = Shop.create(
{name: "Beauty In The Pot", address: "address", township: "Yangon", city: "Yangon", state: "Yangon",
country: "Myanmar", phone_no: "09123456789", reservation_no: "bip000001", license: "license",
activated_at: "2017-06-06", license_data: "license_data", base_currency: "Ks", id_prefix: "abc"}
)