update table invoice
This commit is contained in:
@@ -162,8 +162,13 @@ function checkReceiptNoInFirstBillData(receipt_no,payment) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (payment) {
|
||||
return json_data[0]["payment"];
|
||||
if (json_data.length>0) {
|
||||
return json_data[0]["payment"];
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -25,22 +25,22 @@
|
||||
<div class="card-block">
|
||||
<div class="card-title row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<p> Receipt No: <span id="receipt_no">
|
||||
Receipt No: <span id="receipt_no">
|
||||
<%= @sale.receipt_no rescue '' %>
|
||||
</span></p>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 text-right">
|
||||
<p>Date: <span id="receipt_date"><%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p>
|
||||
Date: <span id="receipt_date"><%= @sale.created_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-title row customer_detail">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<% if @status_sale == 'sale' %>
|
||||
<p class="hidden customer-id"><%= @sale.customer_id rescue '' %></p>
|
||||
<p>Customer : <%= @sale.customer.name rescue '-' %></p>
|
||||
Customer : <%= @sale.customer.name rescue '-' %>
|
||||
<%else%>
|
||||
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||
<p>Customer : <%= @customer.name rescue "-" %></p>
|
||||
Customer : <%= @customer.name rescue "-" %>
|
||||
<%end%>
|
||||
</div>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
|
||||
<%
|
||||
# Can't check for discount
|
||||
unless sale_item.price == 0
|
||||
# unless sale_item.price == 0
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
@@ -77,7 +77,7 @@
|
||||
<td class='item-attr'><%= sale_item.price %></td>
|
||||
</tr>
|
||||
<%
|
||||
end
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user