diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js index 64835a3b..005d6c6a 100644 --- a/app/assets/javascripts/custom.js +++ b/app/assets/javascripts/custom.js @@ -82,7 +82,15 @@ $(document).ready(function() { touchScrollStep : 45 }); - + $('#pending-order-slimscroll').slimScroll({ + height: height-$('#pending-order-slimscroll').attr('data-height'), + size: '5px', + color: 'rgba(0,0,0,0.5)', + alwaysVisible: false, + borderRadius: '0', + railBorderRadius: '0', + touchScrollStep : 50 + }); // $('.delete').click(function(){ // var method = $(this).attr('data-method'); // var url = $(this).attr('data-ref'); diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index ada129dc..91708815 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -519,4 +519,9 @@ nav.pagination .page a:hover, z-index: 101; filter: alpha(opacity=100); /* ie */ -moz-opacity: 1; /* mozilla */ +} +.existing_invoice{ + background-color:#009688; + color:#fff; + } \ No newline at end of file diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 00bfbead..345d089d 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -16,10 +16,10 @@
<%= @sale_array[0].customer_id rescue '' %>
- Customer : <%= @sale_array[0].customer.name rescue '' %> - <% elsif @status_order == 'order' - %> -<%= @customer.customer_id rescue "" %>
- Customer : <%= @customer.name rescue "" %> - <% end %> - -<%= @sale_array[0].customer_id rescue '' %>
+ Customer : <%= @sale_array[0].customer.name rescue '' %> + <% elsif @status_order == 'order' + %> +<%= @customer.customer_id rescue "" %>
+ Customer : <%= @customer.name rescue "" %> + <% end %> +| # | -Items | -QTY - | -Price - | -
|---|---|---|---|
| # | +Items | +QTY | +Price | +
| <%= count %> | <%= sale_item.product_name %> | <%= sale_item.qty %> | <%= sale_item.price %> |
| <%= count %> | +<%= order_item.item_name %>
+ <% if !order_item.options.nil? && !order_item.options.empty? && order_item.options != "undefined" %>
+ <% JSON.parse(order_item.options).each do |option| %>
+ <%= option %> + <% end %> + <% end %> - <% - end - end - - if @status_order == 'order' && @status_sale != 'sale' - puts - unless @order_items.nil? || @order_items.empty? - count = 0 - @order_items.each do |order_item| - set_item_prices = 0 - count += 1 - sub_total = sub_total + (order_item.price * order_item.qty) - - # unless order_item.price == 0 %> - | ||
| <%= count %> | -
- <%= order_item.item_name %>
- <% if !order_item.options.nil? && !order_item.options.empty? && order_item.options != "undefined" %>
- <% JSON.parse(order_item.options).each do |option| %>
- - <%= option %> - + <% if !order_item.set_menu_items.nil? && order_item.set_menu_items != '[]' + JSON.parse(order_item.set_menu_items).each do |item_instance| + set_item_prices += (item_instance["quantity"].to_f * item_instance["price"].to_f).to_f %> + + + <%= item_instance["item_instance_name"] %> + <% if !item_instance["options"].nil? && !item_instance["options"].empty? %> + <% (item_instance["options"]).each do |set_item_option| %> + <%= set_item_option %> <% end %> - <% end %> - - <% if !order_item.set_menu_items.nil? && order_item.set_menu_items != '[]' - JSON.parse(order_item.set_menu_items).each do |item_instance| - set_item_prices += (item_instance["quantity"].to_f * item_instance["price"].to_f).to_f %> - - <%= item_instance["item_instance_name"] %> - <% if !item_instance["options"].nil? && !item_instance["options"].empty? %> - <% (item_instance["options"]).each do |set_item_option| %> - - <%= set_item_option %> - - <% end %> - <% end %> - - <% end - sub_total += set_item_prices - end %> - |
- <%= order_item.qty %> | -<%= (order_item.qty*order_item.price).to_f + set_item_prices %> | -<%= order_item.qty %> | +<%= (order_item.qty*order_item.price).to_f + set_item_prices %> | + + <% end %> + <% end %> + <% end %>
| <%= count %> - |
- <%= order_item.item_name %>
+ <% if @status_sale == 'sale'
+ unless @order_items.nil? || @order_items.empty?%>
+
-
+
<% end %>
<% if @sale_array.size > 1 %>
@@ -449,24 +404,21 @@ <% @sale_array.each do |sale| if @sale_array.size > 1 unless sale.receipt_no == @sale_array[0].receipt_no - %> - -
+
+<%end%>
+
+
+ |