From 88f7d0d2b7fb375272a6980d5425ea80b0afaeba Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Fri, 20 Jul 2018 11:09:56 +0630 Subject: [PATCH] update add to existing for room --- app/views/origami/home/show.html.erb | 4 +- app/views/origami/rooms/show.html.erb | 91 ++++++++++++++++++++++++++- 2 files changed, 91 insertions(+), 4 deletions(-) diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 10bd36cd..fdc8821b 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -192,11 +192,13 @@
<% existing_class = "" %><% existing_order = false %> - <% if @status_sale == 'sale' && (!@order_items.nil?) %> + <% if @status_sale == 'sale' + unless @order_items.nil? || @order_items.empty?%> <% existing_class = "existing_invoice"%> <% existing_order = true %> <% tooltip = ' data-toggle=modal title=Add_To_Existing data-target=#invoiceModal'%> <%end%> + <%end%>
> <% if @status_order == 'order' && @status_sale != 'sale' %> <% if !@obj_order.nil? %> diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index 54cbd97f..7a2c4d0a 100755 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -211,7 +211,15 @@
-
+ <% existing_class = "" %><% existing_order = false %> + <% if @status_sale == 'sale' + unless @order_items.nil? || @order_items.empty?%> + <% existing_class = "existing_invoice"%> + <% existing_order = true %> + <% tooltip = ' data-toggle=modal title=Add_To_Existing data-target=#invoiceModal'%> + <%end%> + <%end%> +
> <% if @status_order == 'order' %> <% if !@obj_order.nil? %>
@@ -419,7 +427,7 @@ if @status_sale == 'sale' unless @order_items.nil? || @order_items.empty? %> - Pending New Order + <% if @sale_array.size > 1 %>

Pending Payment @@ -673,7 +681,84 @@
+<% if @status_sale == 'sale' && (!@order_items.nil?) %> + +<%end%>