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";
|
delivery_type = "DELIVERY";
|
||||||
}else if(value.provider == "pick_up"){
|
}else if(value.provider == "pick_up"){
|
||||||
delivery_type = "PICK-UP";
|
delivery_type = "PICK-UP";
|
||||||
|
}else if(value.provider == "turbo"){
|
||||||
|
delivery_type = "TURBO";
|
||||||
}else{
|
}else{
|
||||||
delivery_type = "DIRECT DELIVERY";
|
delivery_type = "DIRECT DELIVERY";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,8 +109,12 @@ 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"
|
||||||
|
|||||||
@@ -1,23 +1,29 @@
|
|||||||
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
|
||||||
|
|
||||||
@shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
|
@shift_sale_range = ''
|
||||||
|
|
||||||
@shift = ''
|
@shift = ''
|
||||||
if params[:shift_name].to_i != 0
|
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])
|
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)
|
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL ',shift_sale.shift_started_at)
|
||||||
else
|
else
|
||||||
|
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)
|
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
provider = params[:provider]
|
provider = params[:provider]
|
||||||
payment_type = params[:payment_type]
|
payment_type = params[:payment_type]
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -252,6 +252,8 @@
|
|||||||
provider = "Pick-Up"
|
provider = "Pick-Up"
|
||||||
elsif @delivery.provider == 'direct_delivery'
|
elsif @delivery.provider == 'direct_delivery'
|
||||||
provider = "Direct Delivery"
|
provider = "Direct Delivery"
|
||||||
|
elsif @delivery.provider == 'turbo'
|
||||||
|
provider = "TURBO"
|
||||||
else
|
else
|
||||||
provider = @delivery.provider
|
provider = @delivery.provider
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user