diff --git a/app/controllers/api/orders_controller.rb b/app/controllers/api/orders_controller.rb index ac26e052..dd648bb4 100755 --- a/app/controllers/api/orders_controller.rb +++ b/app/controllers/api/orders_controller.rb @@ -249,7 +249,7 @@ class Api::OrdersController < Api::ApiController order_queue_printer.print_order_item(print_settings, oqs, order_item.order_id, order_items_id, print_status=" (Cancelled)", before_updated_qty ) end - return return_json_status_with_code(400, "updated successfully!") + return return_json_status_with_code(200, "updated successfully!") else return return_json_status_with_code(406, "Checkout time is over!") end diff --git a/app/models/printer/receipt_printer.rb b/app/models/printer/receipt_printer.rb index 597f264a..a5482b31 100755 --- a/app/models/printer/receipt_printer.rb +++ b/app/models/printer/receipt_printer.rb @@ -262,11 +262,11 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker def print_receipt_pdf(filename,receipt_no,print_copies,printer_name) count = print_copies.to_i # if count == 0 - # self.print("public"+filename, printer_name) + # self.print(filename, printer_name) # else begin if count == 1 - self.print("public"+filename, printer_name) + self.print(filename, printer_name) else filename = "public/receipts/receipt_bill_#{receipt_no}_#{count}.pdf" self.print(filename, printer_name) diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 1d25c5c4..457bd6ab 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -623,7 +623,7 @@ var customer_name = "<%= @customer.name %>"; $("#sale_receipt_no").val(result.receipt_no); $("#filename").val(result.filename); $("#printer_name").val(result.printer_name); - $("#receipt_pdf").attr("src", result.filename); + $("#receipt_pdf").attr("src", result.filename.substring(6)); $("#pdfModal").modal({show : true, backdrop : false, keyboard : false}); $("#pdfModalLabel").text("Sale Completed"); $("#changed_amount").text("");