diff --git a/app/jobs/print_receipt_job.rb b/app/jobs/print_receipt_job.rb index 67623f10..0a6f2f55 100644 --- a/app/jobs/print_receipt_job.rb +++ b/app/jobs/print_receipt_job.rb @@ -38,7 +38,7 @@ class PrintReceiptJob < ApplicationJob other_amount = SaleItem.calculate_other_charges(sale_items) printer = Printer::ReceiptPrinter.new(print_settings) - byebug + if saleObj.sale_status == 'completed' printer.print_receipt_bill(print_settings, false, nil, cashier_terminal, sale_items, saleObj, customer.paypar_account_no, item_price_by_accounts, discount_price_by_accounts, member_info, rebate_amount, current_shop, 'paid', current_balance, card_data, other_amount, latest_order_no, card_balance_amount, nil, transaction_ref) elsif saleObj.generic_void? diff --git a/app/views/foodcourt/discounts/index.html.erb b/app/views/foodcourt/discounts/index.html.erb index 44495898..ebc481a2 100755 --- a/app/views/foodcourt/discounts/index.html.erb +++ b/app/views/foodcourt/discounts/index.html.erb @@ -488,7 +488,12 @@ var sub_total = totalAmount; var ajax_url = "/foodcourt/" + sale_id + "/discount"; - var params = { 'cashier_type' : cashier_type, 'sale_id': sale_id, 'sub_total': sub_total, 'discount_items': discount_items, 'overall_discount': overall_discount }; + if (cashier_type == "food_court_qr") { + var c_type = "food_court"; + var params = { 'cashier_type' : c_type, 'sale_id': sale_id, 'sub_total': sub_total, 'discount_items': discount_items, 'overall_discount': overall_discount }; + }else{ + var params = { 'cashier_type' : cashier_type, 'sale_id': sale_id, 'sub_total': sub_total, 'discount_items': discount_items, 'overall_discount': overall_discount }; + } $.ajax({ type: "POST", diff --git a/app/views/foodcourt/qrpay/precreate.html.erb b/app/views/foodcourt/qrpay/precreate.html.erb index e7d4eb67..fd9f046a 100644 --- a/app/views/foodcourt/qrpay/precreate.html.erb +++ b/app/views/foodcourt/qrpay/precreate.html.erb @@ -174,6 +174,7 @@ <% end %> <% end %> +