reprint for cloud
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user