add order and reservation, quick service in lookups and add date and order by in order reservation
This commit is contained in:
@@ -60,9 +60,9 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
|
||||
order_reservation_id, flag = OrderReservation.addOrderReservationInfo(order_reservation)
|
||||
|
||||
order_reservation = OrderReservation.find(order_reservation_id)
|
||||
# if ENV["SERVER_MODE"] != 'cloud'
|
||||
# ActionCable.server.broadcast "order_reservation_channel",data: order_reservation
|
||||
# end
|
||||
if flag #&& ENV["SERVER_MODE"] != 'cloud'
|
||||
ActionCable.server.broadcast "order_reservation_channel",data: order_reservation
|
||||
end
|
||||
if flag
|
||||
render :json => { :status => true, :order_reservation_id => order_reservation_id, :message => "Order reservation is successfully created!" }
|
||||
else
|
||||
|
||||
@@ -56,6 +56,22 @@ class Origami::DashboardController < BaseOrigamiController
|
||||
# get printer info
|
||||
@print_settings = PrintSetting.get_precision_delimiter()
|
||||
@current_user = current_user
|
||||
#quick service
|
||||
quick_service = Lookup.collection_of('quick_service')
|
||||
@quick_service = 0
|
||||
if !quick_service[0].nil?
|
||||
@quick_service = quick_service[0][1]
|
||||
end
|
||||
#order reservation
|
||||
order_reservation = Lookup.collection_of('order_reservation')
|
||||
@order_reservation = 0
|
||||
if !order_reservation.empty?
|
||||
order_reservation.each do |order_reserve|
|
||||
if order_reserve[0] == 'OrderReservation'
|
||||
@order_reservation = order_reserve[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Origami::OrderReservationController < BaseOrigamiController
|
||||
|
||||
def index
|
||||
@order = OrderReservation.all
|
||||
@order = OrderReservation.latest_order
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
@@ -6,7 +6,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
def first_bill
|
||||
sale_id = params[:sale_id] # sale_id
|
||||
sale_data = Sale.find_by_sale_id(sale_id)
|
||||
sale_items = SaleItem.where("sale_id=?",sale_id)
|
||||
sale_items = SaleItem.select("sale_id,product_code,item_instance_code,product_name,product_alt_name,account_id,status,remark,SUM(qty) as qty,unit_price,taxable_price,price,is_taxable").where("sale_id=?",sale_id).group("item_instance_code,price")
|
||||
member_info = nil
|
||||
|
||||
# For Cashier by Zone
|
||||
|
||||
Reference in New Issue
Block a user