add printer brand and api and type
This commit is contained in:
@@ -176,7 +176,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
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,balance,card_data)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
#Print
|
||||
pdf = ReceiptBillPdf.new(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status,balance,card_data)
|
||||
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
|
||||
if !receipt_bill_a5_pdf.empty?
|
||||
@@ -202,14 +202,14 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
|
||||
begin
|
||||
if count == 1
|
||||
filename = "/receipts/receipt_bill_#{sale_data.receipt_no}.pdf"
|
||||
pdf.render_file directory_name + "/receipt_bill_#{sale_data.receipt_no}.pdf"
|
||||
filename = directory_name + "/receipt_bill_#{sale_data.receipt_no}.pdf"
|
||||
pdf.render_file filename
|
||||
if printed_status != 'Paid'
|
||||
self.print(directory_name + "/receipt_bill_#{sale_data.receipt_no}.pdf", cashier_terminal.printer_name)
|
||||
end
|
||||
else
|
||||
filename = "/receipts/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf"
|
||||
pdf.render_file directory_name + "/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf"
|
||||
filename = directory_name + "/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf"
|
||||
pdf.render_file filename
|
||||
if printed_status != 'Paid'
|
||||
self.print(directory_name + "/receipt_bill_#{sale_data.receipt_no}_#{count}.pdf", cashier_terminal.printer_name)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user