Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-01-25 09:21:38 +06:30
2 changed files with 13 additions and 8 deletions

View File

@@ -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;
}

View File

@@ -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">
&nbsp; 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>&nbsp;
</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>
&nbsp; Customer : <%= @sale.customer.name rescue '-' %>
<%else%>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p>Customer : <%= @customer.name rescue "-" %></p>
&nbsp; 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