diff --git a/app/assets/javascripts/order_reservation.js b/app/assets/javascripts/order_reservation.js index 82aad283..46d035fe 100644 --- a/app/assets/javascripts/order_reservation.js +++ b/app/assets/javascripts/order_reservation.js @@ -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"); diff --git a/app/controllers/api/order_reserve/order_reservation_controller.rb b/app/controllers/api/order_reserve/order_reservation_controller.rb index 38237324..fc05fe20 100644 --- a/app/controllers/api/order_reserve/order_reservation_controller.rb +++ b/app/controllers/api/order_reserve/order_reservation_controller.rb @@ -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) diff --git a/app/controllers/reports/order_reservation_controller.rb b/app/controllers/reports/order_reservation_controller.rb index 02f2478c..0966c619 100644 --- a/app/controllers/reports/order_reservation_controller.rb +++ b/app/controllers/reports/order_reservation_controller.rb @@ -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 diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index 4b6488e0..96dac54b 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -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 %> diff --git a/app/views/reports/order_reservation/index.html.erb b/app/views/reports/order_reservation/index.html.erb index 4a342775..07dba055 100755 --- a/app/views/reports/order_reservation/index.html.erb +++ b/app/views/reports/order_reservation/index.html.erb @@ -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 diff --git a/app/views/reports/order_reservation/index.xls.erb b/app/views/reports/order_reservation/index.xls.erb index f9565356..bd27fa36 100755 --- a/app/views/reports/order_reservation/index.xls.erb +++ b/app/views/reports/order_reservation/index.xls.erb @@ -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 diff --git a/app/views/reports/payment_method/index.html.erb b/app/views/reports/payment_method/index.html.erb index b5dce43d..919ba39c 100755 --- a/app/views/reports/payment_method/index.html.erb +++ b/app/views/reports/payment_method/index.html.erb @@ -96,11 +96,11 @@ <%if @payment_type.present?%> - <%=@payment_type.upcase%> Payment Details + <%=@payment_type.upcase%> Payment Details <%else%> - All Payment Details + All Payment Details <%end%> diff --git a/app/views/reports/payment_method/index.xls.erb b/app/views/reports/payment_method/index.xls.erb index ab966b7d..047df5f9 100755 --- a/app/views/reports/payment_method/index.xls.erb +++ b/app/views/reports/payment_method/index.xls.erb @@ -83,11 +83,11 @@ <%if @payment_type.present?%> - <%=@payment_type.upcase%> Payment Details + <%=@payment_type.upcase%> Payment Details <%else%> - All Payment Details + All Payment Details <%end%> diff --git a/app/views/transactions/order_reservations/index.html.erb b/app/views/transactions/order_reservations/index.html.erb index 480d9d76..dc0f9564 100644 --- a/app/views/transactions/order_reservations/index.html.erb +++ b/app/views/transactions/order_reservations/index.html.erb @@ -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