check order reservation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class Reports::OrderReservationController < BaseReportController
|
||||
# authorize_resource :class => false
|
||||
def index
|
||||
@payments = [["All Payment",''], ["Cash Payment","cash"], ["Credit Payment","creditnote"], ["FOC Payment","foc"], ["Other Payment","card"]]
|
||||
@providers = [["All",''], ["food2u","food2u"], ["Self Pick-Up","pick_up"], ["Ygndoor2door","ygndoor2door"], ["Direct Delivery","direct_delivery"]]
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@@ -17,8 +17,9 @@ class Reports::OrderReservationController < BaseReportController
|
||||
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at)
|
||||
end
|
||||
end
|
||||
payment_type = params[:payment_type]
|
||||
@sale_data = Sale.get_sales_by_order_reservation(@shift_sale_range,@shift,from,to,payment_type)
|
||||
|
||||
provider = params[:provider]
|
||||
@sale_data = OrderReservation.get_order_reservation_by_shift(@shift_sale_range,@shift,from,to,provider)
|
||||
@from = from
|
||||
@to = to
|
||||
# get printer info
|
||||
@@ -40,7 +41,7 @@ class Reports::OrderReservationController < BaseReportController
|
||||
def show
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
|
||||
date_arr = Array.new
|
||||
@sale_data.each do |sale|
|
||||
|
||||
Reference in New Issue
Block a user