check function for order and bank

This commit is contained in:
phyusin
2018-08-07 14:13:00 +06:30
parent 456bb61f61
commit de5448b7a0
2 changed files with 33 additions and 31 deletions

View File

@@ -21,36 +21,6 @@ class ApplicationController < ActionController::Base
def shop_detail
@shop = Shop.first
end
def order_reservation
order_reserve = Lookup.collection_of('order_reservation')
status = false
if !order_reserve.empty?
order_reserve.each do |order|
if order[0] == 'OrderReservation'
if order[1] == '1'
status = true
end
end
end
end
return status
end
def bank_integration
bank_integration = Lookup.collection_of('bank_integration')
status = false
if !bank_integration.empty?
bank_integration.each do |bank|
if bank[0] == 'Bank Integration'
if bank[1] == '1'
status = true
end
end
end
end
return status
end
end