Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -24,6 +24,8 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
|
||||
delivery_type = "DELIVERY";
|
||||
}else if(value.provider == "pick_up"){
|
||||
delivery_type = "PICK-UP";
|
||||
}else if(value.provider == "turbo"){
|
||||
delivery_type = "TURBO";
|
||||
}else{
|
||||
delivery_type = "DIRECT DELIVERY";
|
||||
}
|
||||
|
||||
@@ -381,6 +381,9 @@ function show_order_detail(url,sr_no){
|
||||
}else if(delivery.provider == "pick_up"){
|
||||
$("#delivery_info").text("(PICK-UP)");
|
||||
$("#delivery_to").text("PICK-UP");
|
||||
}else if(delivery.provider == "turbo"){
|
||||
$("#delivery_info").text("(TURBO)");
|
||||
$("#delivery_to").text("TURBO");
|
||||
}else{
|
||||
$("#delivery_info").text("(DIRECT DELIVERY)");
|
||||
$("#delivery_to").text("DIRECT DELIVERY");
|
||||
|
||||
@@ -109,9 +109,13 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
|
||||
remark = params[:remark]
|
||||
|
||||
if params[:status] && params[:remark]
|
||||
reason = status +"||"+remark
|
||||
order_reservation = OrderReservation.find(order_reservation_id)
|
||||
|
||||
if !order_reservation.remark.nil?
|
||||
reason = order_reservation.remark + "//" + status +"||"+remark
|
||||
else
|
||||
reason = status +"||"+remark
|
||||
end
|
||||
|
||||
if status == 'REMOVE'
|
||||
if order_reservation.status == "new" || order_reservation.status == "accepted"
|
||||
OrderReservation.update_order_reservation(order_reservation_id, nil, "rejected",nil,remark)
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
class Reports::OrderReservationController < BaseReportController
|
||||
# authorize_resource :class => false
|
||||
def index
|
||||
@providers = [["All",''], ["Direct Delivery","direct_delivery"],["Pick-Up","pick_up"],["food2u","food2u"], ["ygndoor2door","ygndoor2door"]]
|
||||
@providers = [["All",''], ["Direct Delivery","direct_delivery"],["Pick-Up","pick_up"],["TURBO","turbo"],["food2u","food2u"], ["ygndoor2door","ygndoor2door"]]
|
||||
@payment_types = [["All",''], ["COD","cash_on_delivery"],["DINGA","dinga"]]
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
@shift_sale_range = ''
|
||||
|
||||
@shift = ''
|
||||
if params[:shift_name].to_i != 0
|
||||
|
||||
@shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
|
||||
shift_sale = ShiftSale.find(params[:shift_name])
|
||||
if to.blank?
|
||||
if to.blank?
|
||||
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL ',shift_sale.shift_started_at)
|
||||
else
|
||||
|
||||
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at)
|
||||
if shift_sale.shift_closed_at.blank?
|
||||
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL',shift_sale.shift_started_at)
|
||||
else
|
||||
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
@@ -148,6 +150,8 @@
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
@@ -197,6 +201,8 @@
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
@@ -246,6 +252,8 @@
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
@@ -295,6 +303,8 @@
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
|
||||
@@ -125,6 +125,8 @@
|
||||
provider = "Pick-Up"
|
||||
elsif order_reservation.provider == 'direct_delivery'
|
||||
provider = "Direct Delivery"
|
||||
elsif order_reservation.provider == 'turbo'
|
||||
provider = "TURBO"
|
||||
else
|
||||
provider = order_reservation.provider
|
||||
end
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
provider = "Pick-Up"
|
||||
elsif order_reservation.provider == 'direct_delivery'
|
||||
provider = "Direct Delivery"
|
||||
elsif order_reservation.provider == 'turbo'
|
||||
provider = "TURBO"
|
||||
else
|
||||
provider = order_reservation.provider
|
||||
end
|
||||
|
||||
@@ -96,11 +96,11 @@
|
||||
<thead>
|
||||
<%if @payment_type.present?%>
|
||||
<tr>
|
||||
<td colspan="6"><strong><%=@payment_type.upcase%> Payment Details</strong></td>
|
||||
<td colspan="7"><strong><%=@payment_type.upcase%> Payment Details</strong></td>
|
||||
</tr>
|
||||
<%else%>
|
||||
<tr>
|
||||
<td colspan="6"><strong>All Payment Details</strong></td>
|
||||
<td colspan="7"><strong>All Payment Details</strong></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
|
||||
|
||||
@@ -83,11 +83,11 @@
|
||||
<thead>
|
||||
<%if @payment_type.present?%>
|
||||
<tr>
|
||||
<td colspan="6"><strong><%=@payment_type.upcase%> Payment Details</strong></td>
|
||||
<td colspan="7"><strong><%=@payment_type.upcase%> Payment Details</strong></td>
|
||||
</tr>
|
||||
<%else%>
|
||||
<tr>
|
||||
<td colspan="6"><strong>All Payment Details</strong></td>
|
||||
<td colspan="7"><strong>All Payment Details</strong></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
|
||||
|
||||
@@ -134,6 +134,8 @@
|
||||
provider = "Pick-Up"
|
||||
elsif order_reservation.provider == 'direct_delivery'
|
||||
provider = "Direct Delivery"
|
||||
elsif order_reservation.provider == 'turbo'
|
||||
provider = "TURBO"
|
||||
else
|
||||
provider = order_reservation.provider
|
||||
end
|
||||
|
||||
@@ -252,6 +252,8 @@
|
||||
provider = "Pick-Up"
|
||||
elsif @delivery.provider == 'direct_delivery'
|
||||
provider = "Direct Delivery"
|
||||
elsif @delivery.provider == 'turbo'
|
||||
provider = "TURBO"
|
||||
else
|
||||
provider = @delivery.provider
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user