update bug sale
This commit is contained in:
@@ -82,12 +82,13 @@
|
||||
<td>Discount</td>
|
||||
<td colspan="2"><%= number_with_precision(@sale.total_discount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
</tr>
|
||||
<% @sale.sale_taxes.each do |r|%>
|
||||
<tr>
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td>Tax</td>
|
||||
<td colspan="2"><%= number_with_precision(@sale.total_tax, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
<td><%= r.tax_name %>(<%= r.tax_rate %>)</td>
|
||||
<td colspan="2"><%= number_with_precision(r.tax_payable_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
<tr>
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td>Grand Total</td>
|
||||
@@ -99,21 +100,24 @@
|
||||
<td>Pay Amount</td>
|
||||
<td colspan="2"><%= number_with_precision(@sale.amount_received, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td>Change</td>
|
||||
<td colspan="2"><%= number_with_precision(@sale.amount_changed, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
</tr>
|
||||
|
||||
<% @sale_receivables.each do |r|%>
|
||||
<tr>
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td>Payment <%= r.payment_method rescue ' '%></td>
|
||||
<td colspan="2"><%= number_with_precision(r.payment_amount, :precision => 2, :delimiter => ',') rescue ' '%>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td>Change</td>
|
||||
<td colspan="2"><%= number_with_precision(@sale.amount_changed, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -160,7 +164,61 @@
|
||||
<div class="tab-pane" id="customer" role="tabpanel">
|
||||
|
||||
<div class="table-responsive">
|
||||
<!-- -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<br>
|
||||
<h4>Customer Profile</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td><%= @customer.name %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<td><%= @customer.email %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contact no</th>
|
||||
<td><%= @customer.contact_no %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<td><%= @customer.company %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Date Of Birth</th>
|
||||
<td><%= @customer.date_of_birth %> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<br>
|
||||
<h4>Membership Detail</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<% if @membership == 0 %>
|
||||
<tr>
|
||||
<td colspan="2">"There is no membership data"</td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<% @membership.each do |member| %>
|
||||
<tr>
|
||||
<th><%= member["accountable_type"] %></th>
|
||||
<td><%= member["balance"] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -169,16 +227,15 @@
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<a href="<%= transactions_sales_path%>" style="margin-top: 10px " class="btn btn-primary pull-right btn-lg">
|
||||
<a href="<%= transactions_sales_path%>" style="margin-top: 10px " class="btn btn-primary btn-lg">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
</a>
|
||||
|
||||
<!-- Temporary No Needs -->
|
||||
<a href="<%= transactions_void_path(@sale)%>" style="margin-top: 10px " class="btn btn-danger pull-right btn-lg">
|
||||
|
||||
<a href="<%= transactions_void_path(@sale)%>" style="margin-top: 10px " class="btn btn-danger btn-lg">
|
||||
<i class="fa fa-trash fa-lg"></i> Void Sale
|
||||
</a>
|
||||
<a href="<%= transactions_manual_complete_sale_path(@sale)%>" style="margin-top: 10px " class="btn btn-success pull-right btn-lg">
|
||||
<a href="<%= transactions_manual_complete_sale_path(@sale)%>" style="margin-top: 10px " class="btn btn-success btn-lg">
|
||||
<i class="fa fa-invoice fa-lg"></i> Complete Sale
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user