shop code
This commit is contained in:
@@ -70,12 +70,12 @@ class Foodcourt::OrdersController < BaseFoodcourtController
|
||||
.joins("JOIN orders ON orders.order_id=booking_orders.order_id")
|
||||
.joins("JOIN order_items ON orders.order_id=order_items.order_id")
|
||||
.joins("JOIN customers ON orders.customer_id=customers.customer_id")
|
||||
.where("orders.source='app' and bookings.shop_code=? and DATE(bookings.created_at)=?",Shop.current_shop.shop_code,Date.today).order("bookings.created_at desc").uniq
|
||||
.where("orders.source='app' and bookings.shop_code=? and DATE(bookings.created_at)=?",@shop.shop_code,Date.today).order("bookings.created_at desc").uniq
|
||||
end
|
||||
def completed
|
||||
customer =Customer.find_by_customer_id(params[:customer_id])
|
||||
phone_number =customer.contact_no
|
||||
if Order.send_message(phone_number,params[:order_id],Shop.current_shop.name)
|
||||
if Order.send_message(phone_number,params[:order_id],@shop.name)
|
||||
booking =Booking.find(params[:booking_id])
|
||||
booking.booking_status ='completed'
|
||||
booking.save!
|
||||
|
||||
Reference in New Issue
Block a user