Pending Payment
This commit is contained in:
@@ -138,7 +138,7 @@
|
|||||||
<%if @customer %>
|
<%if @customer %>
|
||||||
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||||
<p>Customer : <%= @customer.name rescue "" %></p>
|
<p>Customer : <%= @customer.name rescue "" %></p>
|
||||||
<%end%>
|
<%end%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
@@ -249,8 +249,10 @@
|
|||||||
</table>
|
</table>
|
||||||
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
|
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if @sale_array.size > 1 %>
|
||||||
<br><br>
|
<br><br>
|
||||||
Pending Payment
|
Pending Payment
|
||||||
|
<% end %>
|
||||||
<% @sale_array.each do |sale|
|
<% @sale_array.each do |sale|
|
||||||
if @sale_array.size > 1
|
if @sale_array.size > 1
|
||||||
unless sale.receipt_no == @sale_array[0].receipt_no
|
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 "" %>"
|
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
|
||||||
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
|
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#void').on('click',function () {
|
$('#void').on('click',function () {
|
||||||
var sure = confirm("Are you sure want to Void");
|
var sure = confirm("Are you sure want to Void");
|
||||||
if (sure == true) {
|
if (sure == true) {
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
sub_total = 0
|
sub_total = 0
|
||||||
if @status == "sale"
|
if @status == "sale"
|
||||||
@obj.sale_items.each do |sale_item|
|
@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 %>">
|
<input type="hidden" id="sale_id" value="<%= @obj.sale_id %>">
|
||||||
<% unless sale_item.price == 0 %>
|
<% unless sale_item.price == 0 %>
|
||||||
@@ -213,32 +213,52 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<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
|
||||||
|
%>
|
||||||
|
|
||||||
<%
|
<tr>
|
||||||
if @status == 'sale'
|
<td><%= count %>
|
||||||
unless @order_items.nil?
|
<td class='item-name'><%= order_item.item_name %></td>
|
||||||
%>
|
<td class='item-attr'><%= order_item.qty %></td>
|
||||||
Added New Order
|
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
|
||||||
<table class="table table-striped">
|
</tr>
|
||||||
<%
|
|
||||||
@order_items.each do |order_item |
|
<%
|
||||||
|
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>
|
<table class="table table-striped">
|
||||||
<td class='item-name'><%= order_item.item_name %></td>
|
<tr>
|
||||||
<td class='item-attr'><%= order_item.qty %></td>
|
<td>Receipt No - <%= sale.receipt_no %></td>
|
||||||
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
|
<td><button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show Detail </button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
<%
|
<%
|
||||||
end
|
end
|
||||||
%>
|
end
|
||||||
</table>
|
end
|
||||||
<button class='btn btn-primary'> Add to existing invoice </button>
|
end
|
||||||
<%
|
%>
|
||||||
end
|
|
||||||
end
|
|
||||||
%>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user