add print job for qr pay
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user