split bill fixed
This commit is contained in:
@@ -239,7 +239,7 @@
|
||||
<div class="col-lg-8 col-md-8 col-sm-8">
|
||||
Receipt No: <span id="receipt_no">
|
||||
<% if @status_sale == 'sale' %>
|
||||
<%= @sale_array[0].receipt_no rescue '' %>
|
||||
<%= @obj_sale.receipt_no rescue '' %>
|
||||
<% end %>
|
||||
</span>
|
||||
<br>
|
||||
@@ -266,8 +266,8 @@
|
||||
<div class="row p-l-5 p-r-5">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<% if @status_sale == 'sale' %>
|
||||
<p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p>
|
||||
Customer : <%= @sale_array[0].customer.name rescue '' %>
|
||||
<p class="hidden customer-id"><%= @obj_sale.customer_id rescue '' %></p>
|
||||
Customer : <%= @obj_sale.customer.name rescue '' %>
|
||||
<% elsif @status_order == 'order'
|
||||
%>
|
||||
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||
@@ -291,9 +291,9 @@
|
||||
<% count = 0
|
||||
sub_total = 0
|
||||
if @status_sale == "sale"
|
||||
@sale_array[0].sale_items.each do |sale_item|
|
||||
@obj_sale.sale_items.each do |sale_item|
|
||||
sub_total = sub_total + sale_item.price%>
|
||||
<input type="hidden" id="sale_id" value="<%= @sale_array[0].sale_id %>">
|
||||
<input type="hidden" id="sale_id" value="<%= @obj_sale.sale_id %>">
|
||||
<%count += 1 %>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
@@ -455,7 +455,7 @@
|
||||
<% end %>
|
||||
<% @sale_array.each do |sale|
|
||||
if @sale_array.size > 1
|
||||
unless sale.receipt_no == @sale_array[0].receipt_no
|
||||
unless sale.receipt_no == @obj_sale.receipt_no
|
||||
%>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
@@ -529,7 +529,7 @@
|
||||
<button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect">Charges</button>
|
||||
|
||||
<% if !@split_bill.nil? %>
|
||||
<% if @split_bill == '1' && (!(@order_items.nil?) || !(@order_items.empty?)) %>
|
||||
<% if @split_bill == '1' && (@orde_items.present?) %>
|
||||
<button type="button" id="split_bills" class="btn btn-block bg-blue waves-effect">Split Bill</button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user