add new delivery type for turbo
This commit is contained in:
@@ -381,6 +381,9 @@ function show_order_detail(url,sr_no){
|
|||||||
}else if(delivery.provider == "pick_up"){
|
}else if(delivery.provider == "pick_up"){
|
||||||
$("#delivery_info").text("(PICK-UP)");
|
$("#delivery_info").text("(PICK-UP)");
|
||||||
$("#delivery_to").text("PICK-UP");
|
$("#delivery_to").text("PICK-UP");
|
||||||
|
}else if(delivery.provider == "turbo"){
|
||||||
|
$("#delivery_info").text("(TURBO)");
|
||||||
|
$("#delivery_to").text("TURBO");
|
||||||
}else{
|
}else{
|
||||||
$("#delivery_info").text("(DIRECT DELIVERY)");
|
$("#delivery_info").text("(DIRECT DELIVERY)");
|
||||||
$("#delivery_to").text("DIRECT DELIVERY");
|
$("#delivery_to").text("DIRECT DELIVERY");
|
||||||
|
|||||||
@@ -109,9 +109,13 @@ class Api::OrderReserve::OrderReservationController < Api::ApiController
|
|||||||
remark = params[:remark]
|
remark = params[:remark]
|
||||||
|
|
||||||
if params[:status] && params[:remark]
|
if params[:status] && params[:remark]
|
||||||
reason = status +"||"+remark
|
|
||||||
order_reservation = OrderReservation.find(order_reservation_id)
|
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 status == 'REMOVE'
|
||||||
if order_reservation.status == "new" || order_reservation.status == "accepted"
|
if order_reservation.status == "new" || order_reservation.status == "accepted"
|
||||||
OrderReservation.update_order_reservation(order_reservation_id, nil, "rejected",nil,remark)
|
OrderReservation.update_order_reservation(order_reservation_id, nil, "rejected",nil,remark)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Reports::OrderReservationController < BaseReportController
|
class Reports::OrderReservationController < BaseReportController
|
||||||
# authorize_resource :class => false
|
# authorize_resource :class => false
|
||||||
def index
|
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"]]
|
@payment_types = [["All",''], ["COD","cash_on_delivery"],["DINGA","dinga"]]
|
||||||
|
|
||||||
from, to = get_date_range_from_params
|
from, to = get_date_range_from_params
|
||||||
|
|||||||
@@ -98,6 +98,8 @@
|
|||||||
DELIVERY
|
DELIVERY
|
||||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||||
PICK-UP
|
PICK-UP
|
||||||
|
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||||
|
TURBO
|
||||||
<% else %>
|
<% else %>
|
||||||
DIRECT DELIVERY
|
DIRECT DELIVERY
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -148,6 +150,8 @@
|
|||||||
DELIVERY
|
DELIVERY
|
||||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||||
PICK-UP
|
PICK-UP
|
||||||
|
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||||
|
TURBO
|
||||||
<% else %>
|
<% else %>
|
||||||
DIRECT DELIVERY
|
DIRECT DELIVERY
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -197,6 +201,8 @@
|
|||||||
DELIVERY
|
DELIVERY
|
||||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||||
PICK-UP
|
PICK-UP
|
||||||
|
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||||
|
TURBO
|
||||||
<% else %>
|
<% else %>
|
||||||
DIRECT DELIVERY
|
DIRECT DELIVERY
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -246,6 +252,8 @@
|
|||||||
DELIVERY
|
DELIVERY
|
||||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||||
PICK-UP
|
PICK-UP
|
||||||
|
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||||
|
TURBO
|
||||||
<% else %>
|
<% else %>
|
||||||
DIRECT DELIVERY
|
DIRECT DELIVERY
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -295,6 +303,8 @@
|
|||||||
DELIVERY
|
DELIVERY
|
||||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||||
PICK-UP
|
PICK-UP
|
||||||
|
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||||
|
TURBO
|
||||||
<% else %>
|
<% else %>
|
||||||
DIRECT DELIVERY
|
DIRECT DELIVERY
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -125,6 +125,8 @@
|
|||||||
provider = "Pick-Up"
|
provider = "Pick-Up"
|
||||||
elsif order_reservation.provider == 'direct_delivery'
|
elsif order_reservation.provider == 'direct_delivery'
|
||||||
provider = "Direct Delivery"
|
provider = "Direct Delivery"
|
||||||
|
elsif order_reservation.provider == 'turbo'
|
||||||
|
provider = "TURBO"
|
||||||
else
|
else
|
||||||
provider = order_reservation.provider
|
provider = order_reservation.provider
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -101,6 +101,8 @@
|
|||||||
provider = "Pick-Up"
|
provider = "Pick-Up"
|
||||||
elsif order_reservation.provider == 'direct_delivery'
|
elsif order_reservation.provider == 'direct_delivery'
|
||||||
provider = "Direct Delivery"
|
provider = "Direct Delivery"
|
||||||
|
elsif order_reservation.provider == 'turbo'
|
||||||
|
provider = "TURBO"
|
||||||
else
|
else
|
||||||
provider = order_reservation.provider
|
provider = order_reservation.provider
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -96,11 +96,11 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<%if @payment_type.present?%>
|
<%if @payment_type.present?%>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6"><strong><%=@payment_type.upcase%> Payment Details</strong></td>
|
<td colspan="7"><strong><%=@payment_type.upcase%> Payment Details</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<%else%>
|
<%else%>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6"><strong>All Payment Details</strong></td>
|
<td colspan="7"><strong>All Payment Details</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
||||||
|
|||||||
@@ -83,11 +83,11 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<%if @payment_type.present?%>
|
<%if @payment_type.present?%>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6"><strong><%=@payment_type.upcase%> Payment Details</strong></td>
|
<td colspan="7"><strong><%=@payment_type.upcase%> Payment Details</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<%else%>
|
<%else%>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6"><strong>All Payment Details</strong></td>
|
<td colspan="7"><strong>All Payment Details</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
||||||
|
|||||||
@@ -134,6 +134,8 @@
|
|||||||
provider = "Pick-Up"
|
provider = "Pick-Up"
|
||||||
elsif order_reservation.provider == 'direct_delivery'
|
elsif order_reservation.provider == 'direct_delivery'
|
||||||
provider = "Direct Delivery"
|
provider = "Direct Delivery"
|
||||||
|
elsif order_reservation.provider == 'turbo'
|
||||||
|
provider = "TURBO"
|
||||||
else
|
else
|
||||||
provider = order_reservation.provider
|
provider = order_reservation.provider
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user