diff --git a/Gemfile.lock b/Gemfile.lock index b91f774f..87cee400 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,7 +85,7 @@ GEM mime-types (>= 1.16) chartkick (3.4.0) chronic (0.10.2) - chunky_png (1.3.12) + chunky_png (1.4.0) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) @@ -182,7 +182,6 @@ GEM json (> 1.8.4) rails (> 4.2.0) sass-rails (~> 5.0) - pg (1.2.3) prawn (2.3.0) pdf-core (~> 0.8.1) ttfunk (~> 1.6) @@ -239,10 +238,10 @@ GEM nokogiri rubyzip spreadsheet (> 0.6.4) - rqrcode (1.1.2) + rqrcode (2.1.2) chunky_png (~> 1.0) - rqrcode_core (~> 0.1) - rqrcode_core (0.1.2) + rqrcode_core (~> 1.0) + rqrcode_core (1.2.0) rspec-core (3.9.2) rspec-support (~> 3.9.3) rspec-expectations (3.9.2) @@ -381,7 +380,6 @@ DEPENDENCIES mysql2 (~> 0.5.2) nested_form pdfjs_viewer-rails - pg prawn prawn-qrcode prawn-table @@ -391,6 +389,7 @@ DEPENDENCIES rails (~> 5.1.0) redis (~> 3.0) roo + rqrcode (= 2.1.2) rspec-rails (~> 3.5) rubyzip (= 1.0.0) sass-rails (~> 5.0) diff --git a/app/controllers/concerns/multi_tenancy.rb b/app/controllers/concerns/multi_tenancy.rb index cb44389b..5ba6009c 100644 --- a/app/controllers/concerns/multi_tenancy.rb +++ b/app/controllers/concerns/multi_tenancy.rb @@ -13,11 +13,11 @@ module MultiTenancy end def find_tenant_by_subdomain_or_name - if request.subdomains.first && request.subdomains.first != "www" - set_current_tenant(Shop.find_by(subdomain: request.subdomains.first)) - elsif Shop.count == 1 + # if request.subdomains.first && request.subdomains.first != "www" + # set_current_tenant(Shop.find_by(subdomain: request.subdomains.first)) + # elsif Shop.count == 1 set_current_tenant(Shop.first) - end + # end end def not_found diff --git a/app/controllers/foodcourt/qrpay_controller.rb b/app/controllers/foodcourt/qrpay_controller.rb index 9532e53f..15d2168f 100644 --- a/app/controllers/foodcourt/qrpay_controller.rb +++ b/app/controllers/foodcourt/qrpay_controller.rb @@ -239,6 +239,8 @@ class Foodcourt::QrpayController < BaseFoodcourtController qrpayment_service = QrPaymentService.new(sale_id, current_login_employee) result = qrpayment_service.process + PrintReceiptJob.perform_later(current_shop.shop_code, sale_id) + if result[:status] render json: result, status: :ok else diff --git a/app/models/printer/printer_worker.rb b/app/models/printer/printer_worker.rb index d30af42d..5d7cce22 100755 --- a/app/models/printer/printer_worker.rb +++ b/app/models/printer/printer_worker.rb @@ -42,17 +42,17 @@ class Printer::PrinterWorker end def print(file_path, printer_destination = nil ) - if printer_destination.nil? - printer_destination = self.printer_destination - end + # if printer_destination.nil? + # printer_destination = self.printer_destination + # end - copy = self.print_copies - #Print only when printer information is not null - if !self.printer_destination.nil? - (1..copy).each do - page = Cups::PrintJob.new(file_path, printer_destination) - page.print - end - end + # copy = self.print_copies + # #Print only when printer information is not null + # if !self.printer_destination.nil? + # (1..copy).each do + # page = Cups::PrintJob.new(file_path, printer_destination) + # page.print + # end + # end end end diff --git a/app/views/foodcourt/addorders/detail.html.erb b/app/views/foodcourt/addorders/detail.html.erb index 8406c989..f880ba4f 100644 --- a/app/views/foodcourt/addorders/detail.html.erb +++ b/app/views/foodcourt/addorders/detail.html.erb @@ -917,7 +917,7 @@ $('#mmqr').click(function() { $createPayOrderBtn.prop('disabled', false); const errorMsg = xhr.status ? `Status: ${xhr.status} - ${xhr.statusText}` : "Network error"; - swal("Error", errorMsg, "error"); + // swal("Error", errorMsg, "error"); } }); }) diff --git a/app/views/layouts/_read_modal.html.erb b/app/views/layouts/_read_modal.html.erb index ae46564b..8cdccd6e 100644 --- a/app/views/layouts/_read_modal.html.erb +++ b/app/views/layouts/_read_modal.html.erb @@ -1,3 +1,4 @@ +<<<<<<< Updated upstream