diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 602a89d3..4bd7ff59 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -419,7 +419,19 @@ class Origami::PaymentsController < BaseOrigamiController end # if ENV["SERVER_MODE"] != "cloud" #no print in cloud server + receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf unique_code = "ReceiptBillPdf" + if !receipt_bill_a5_pdf.empty? + receipt_bill_a5_pdf.each do |receipt_bilA5| + if receipt_bilA5[0] == 'ReceiptBillA5Pdf' + if receipt_bilA5[1] == '1' + unique_code = "ReceiptBillA5Pdf" + else + unique_code = "ReceiptBillPdf" + end + end + end + end customer= Customer.find(saleObj.customer_id) #shop detail @@ -455,11 +467,12 @@ class Origami::PaymentsController < BaseOrigamiController filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "Re-print",current_balance,card_data) result = { + :status => true, :filepath => filename, :printer_model => print_settings.brand_name, :printer_url => print_settings.api_settings } - + # Mobile Print render :json => result.to_json # end diff --git a/app/views/origami/pending_order/completed_sale.html.erb b/app/views/origami/pending_order/completed_sale.html.erb index 1a649634..3e6f1ad8 100644 --- a/app/views/origami/pending_order/completed_sale.html.erb +++ b/app/views/origami/pending_order/completed_sale.html.erb @@ -1,5 +1,6 @@