check delivery nil for order reservation
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
<tbody>
|
||||
<% i=1
|
||||
@order.each do |order| %>
|
||||
<% if order.status == 'new' %>
|
||||
<% if order.status == 'new' && !order.delivery.nil? %>
|
||||
<tr class="custom-tr first-<%=i%>" style="" data-id="<%=order.order_reservation_id%>" data-sr-no="<%= i %>">
|
||||
<td width ="5%" class="align-left">
|
||||
<%=i%>
|
||||
@@ -95,14 +95,16 @@
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% if !order.delivery.nil? %>
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
@@ -124,7 +126,7 @@
|
||||
<tbody>
|
||||
<% i=1
|
||||
@order.each do |order| %>
|
||||
<% if order.status == 'accepted' %>
|
||||
<% if order.status == 'accepted' && !order.delivery.nil? %>
|
||||
<tr class="custom-tr second-<%=i%>" style="" data-id="<%=order.order_reservation_id%>" data-sr-no="<%= i %>">
|
||||
<td width ="5%" class="align-left">
|
||||
<%=i%>
|
||||
@@ -147,14 +149,16 @@
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% if !order.delivery.nil? %>
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
@@ -175,7 +179,7 @@
|
||||
<tbody>
|
||||
<% i=1
|
||||
@order.each do |order| %>
|
||||
<% if order.status == 'send_to_kitchen' %>
|
||||
<% if order.status == 'send_to_kitchen' && !order.delivery.nil? %>
|
||||
<tr class="custom-tr third-<%=i%>" style="" data-id="<%=order.order_reservation_id%>" data-sr-no="<%= i %>">
|
||||
<td width ="5%" class="align-left">
|
||||
<%=i%>
|
||||
@@ -198,14 +202,16 @@
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% if !order.delivery.nil? %>
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
@@ -226,7 +232,7 @@
|
||||
<tbody>
|
||||
<% i=1
|
||||
@order.each do |order| %>
|
||||
<% if order.status == 'ready_to_delivery' %>
|
||||
<% if order.status == 'ready_to_delivery' && !order.delivery.nil? %>
|
||||
<tr class="custom-tr fourth-<%=i%>" style="" data-id="<%=order.order_reservation_id%>" data-sr-no="<%= i %>">
|
||||
<td width ="5%" class="align-left">
|
||||
<%=i%>
|
||||
@@ -249,14 +255,16 @@
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% if !order.delivery.nil? %>
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
@@ -277,7 +285,7 @@
|
||||
<tbody>
|
||||
<% i=1
|
||||
@order.each do |order| %>
|
||||
<% if order.status == 'delivered' && (order.created_at.utc.getlocal.strftime("%Y-%m-%d") == DateTime.now.strftime("%Y-%m-%d")) %>
|
||||
<% if order.status == 'delivered' && (order.created_at.utc.getlocal.strftime("%Y-%m-%d") == DateTime.now.strftime("%Y-%m-%d")) && !order.delivery.nil? %>
|
||||
<tr class="custom-tr fifth-<%=i%>" style="" data-id="<%=order.order_reservation_id%>" data-sr-no="<%= i %>">
|
||||
<td width ="5%" class="align-left">
|
||||
<%=i%>
|
||||
@@ -300,14 +308,16 @@
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% if !order.delivery.nil? %>
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
<% elsif order.delivery.delivery_type == 'pick_up' %>
|
||||
PICK-UP
|
||||
<% elsif order.delivery.delivery_type == 'turbo' %>
|
||||
TURBO
|
||||
<% else %>
|
||||
DIRECT DELIVERY
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user