print bill by cashier zone

This commit is contained in:
Yan
2017-10-23 18:39:05 +06:30
parent 707cae4cf8
commit c61c7ac98f
3 changed files with 31 additions and 7 deletions

View File

@@ -65,7 +65,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
end
#Bill Receipt Print
def print_receipt_bill(printer_settings,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details, printed_status)
def print_receipt_bill(printer_settings,cashier_terminal,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details, printed_status)
#Use CUPS service
#Generate PDF
#Print
@@ -77,10 +77,10 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
begin
if count == 1
pdf.render_file "tmp/receipt_bill_#{sale_data.receipt_no}.pdf"
self.print("tmp/receipt_bill_#{sale_data.receipt_no}.pdf")
self.print("tmp/receipt_bill_#{sale_data.receipt_no}.pdf", cashier_terminal.printer_name)
else
pdf.render_file "tmp/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf"
self.print("tmp/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf")
self.print("tmp/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf", cashier_terminal.printer_name)
end
count -= 1