add new delivery type for turbo

This commit is contained in:
phyusin
2018-08-30 17:04:32 +06:30
parent fef6a4ccd0
commit 78da662a57
9 changed files with 30 additions and 7 deletions

View File

@@ -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");

View File

@@ -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)

View File

@@ -1,7 +1,7 @@
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

View File

@@ -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 %>

View File

@@ -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

View File

@@ -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

View File

@@ -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%>

View File

@@ -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%>

View File

@@ -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