Pending Payment

This commit is contained in:
Phyo
2017-06-27 12:06:18 +06:30
parent f8062cec64
commit 7810fc693b
2 changed files with 48 additions and 26 deletions

View File

@@ -138,7 +138,7 @@
<%if @customer %>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p>Customer : <%= @customer.name rescue "" %></p>
<%end%>
<%end%>
</div>
</div>
<div class="card-text">
@@ -249,8 +249,10 @@
</table>
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
<% end %>
<% if @sale_array.size > 1 %>
<br><br>
Pending Payment
<% end %>
<% @sale_array.each do |sale|
if @sale_array.size > 1
unless sale.receipt_no == @sale_array[0].receipt_no
@@ -473,7 +475,7 @@ $('#edit').on('click',function(){
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
})
$('#void').on('click',function () {
var sure = confirm("Are you sure want to Void");
if (sure == true) {

View File

@@ -155,7 +155,7 @@
sub_total = 0
if @status == "sale"
@obj.sale_items.each do |sale_item|
sub_total = sub_total + sale_item.price
sub_total = sub_total + sale_item.price
%>
<input type="hidden" id="sale_id" value="<%= @obj.sale_id %>">
<% unless sale_item.price == 0 %>
@@ -213,32 +213,52 @@
</table>
</div>
<br>
<%
if @status_sale == 'sale'
unless @order_items.nil?
%>
Pending New Order
<table class="table table-striped">
<%
count = 0
@order_items.each do |order_item |
count += 1
%>
<%
if @status == 'sale'
unless @order_items.nil?
%>
Added New Order
<table class="table table-striped">
<%
@order_items.each do |order_item |
<tr>
<td><%= count %>
<td class='item-name'><%= order_item.item_name %></td>
<td class='item-attr'><%= order_item.qty %></td>
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
</tr>
<%
end
%>
</table>
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
<% end %>
<% if @sale_array.size > 1 %>
<br><br>
Pending Payment
<% end %>
<% @sale_array.each do |sale|
if @sale_array.size > 1
unless sale.receipt_no == @sale_array[0].receipt_no
%>
<tr>
<td class='item-name'><%= order_item.item_name %></td>
<td class='item-attr'><%= order_item.qty %></td>
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
</tr>
<%
end
%>
</table>
<button class='btn btn-primary'> Add to existing invoice </button>
<%
end
end
%>
<table class="table table-striped">
<tr>
<td>Receipt No - <%= sale.receipt_no %></td>
<td><button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show Detail </button></td>
</tr>
</table>
<%
end
end
end
end
%>
</div>
</div>