add print job for qr pay

This commit is contained in:
aungthetkhaing
2025-06-03 12:04:06 +06:30
parent 3f66dc63c5
commit 3c289a58ff
6 changed files with 190 additions and 22 deletions

View File

@@ -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

View File

@@ -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