From b3a828f709a44bc0ae6010084dfcc8bf2e180710 Mon Sep 17 00:00:00 2001 From: Myat Zin Wai Maw Date: Thu, 2 Jan 2020 17:59:03 +0630 Subject: [PATCH] - --- app/controllers/concerns/multi_tenancy.rb | 4 +-- app/models/printer/printer_worker.rb | 30 +++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/controllers/concerns/multi_tenancy.rb b/app/controllers/concerns/multi_tenancy.rb index b14e2d2a..8aac68aa 100644 --- a/app/controllers/concerns/multi_tenancy.rb +++ b/app/controllers/concerns/multi_tenancy.rb @@ -13,8 +13,8 @@ module MultiTenancy shop_code = request.subdomain.partition('-').last @shop = Shop.find_by(shop_code: shop_code) else - @shop = Shop.first - # @shop = Shop.find_by(shop_code: '262') + # @shop = Shop.first + @shop = Shop.find_by(shop_code: '262') end set_current_tenant(@shop) end diff --git a/app/models/printer/printer_worker.rb b/app/models/printer/printer_worker.rb index e0d4fc85..39cbb431 100755 --- a/app/models/printer/printer_worker.rb +++ b/app/models/printer/printer_worker.rb @@ -38,20 +38,20 @@ class Printer::PrinterWorker end def print(file_path,printer_destination = nil ) - if printer_destination.nil? - printer_destination = self.printer_destination - end - - puts printer_destination - puts '........Printer Destination..........' - - 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 + # if printer_destination.nil? + # printer_destination = self.printer_destination + # end + # + # puts printer_destination + # puts '........Printer Destination..........' + # + # 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