update search and crm
This commit is contained in:
@@ -1,89 +1,103 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<%= crm_root_path %>">Home</a></li>
|
||||
<li class="active">
|
||||
<a href="<%= settings_sales_path %>">Sale</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<a href="<%= settings_sales_path %>"><%= @sale.sale_id %></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<p>
|
||||
<strong>Cashier:</strong>
|
||||
<%= @transactions_sale.cashier %>
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Receipt Date </th>
|
||||
<th>Receipt no</th>
|
||||
<th>Cashier</th>
|
||||
<th>OSales status</th>
|
||||
<th>Receipt generated at</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<p>
|
||||
<strong>Cashier name:</strong>
|
||||
<%= @transactions_sale.cashier_name %>
|
||||
</p>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= @sale.receipt_date.strftime("%d-%M-%Y") %></td>
|
||||
<td><%= @sale.receipt_no %></td>
|
||||
<td><%= @sale.cashier rescue '-' %></td>
|
||||
<td> <%= @sale.sale_status %> </td>
|
||||
<td> <%= @sale.requested_at.strftime("%d-%m-%Y") %> </td>
|
||||
</tr>
|
||||
<tr style="border-top:2px solid #000">
|
||||
<th>Sale item name</th>
|
||||
<th> Qty</th>
|
||||
<th>Unit price</th>
|
||||
<th>Total pirce </th>
|
||||
<th>Created at</th>
|
||||
</tr>
|
||||
<% @sale.sale_items.each do |s| %>
|
||||
|
||||
<p>
|
||||
<strong>Requested by:</strong>
|
||||
<%= @transactions_sale.requested_by %>
|
||||
</p>
|
||||
<tr>
|
||||
<td><%=s.product_name rescue ' '%></td>
|
||||
<td><%=s.qty rescue ' '%></td>
|
||||
<td><%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
<td><%= number_with_precision(s.qty * s.price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
<td><%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr style="border-top:2px solid #000">
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td>Total</td>
|
||||
<td colspan="2"><%= number_with_precision(@sale.total_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
</tr>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td>Discount</td>
|
||||
<td colspan="2"><%= number_with_precision(@sale.total_discount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<td>Grand Total</td>
|
||||
<td colspan="2"><%= number_with_precision(@sale.grand_total, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||
</tr>
|
||||
<tr><td> <td></tr>
|
||||
<tr>
|
||||
<td colspan=2 style="text-align:center"></td>
|
||||
<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>
|
||||
|
||||
<p>
|
||||
<strong>Requested at:</strong>
|
||||
<%= @transactions_sale.requested_at %>
|
||||
</p>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="<%= settings_sales_path%>" class="btn btn-primary pull-left">
|
||||
<i class="fa fa-arrow-left fa-xs"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<strong>Receipt no:</strong>
|
||||
<%= @transactions_sale.receipt_no %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<strong>Receipt date:</strong>
|
||||
<%= @transactions_sale.receipt_date %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Customer:</strong>
|
||||
<%= @transactions_sale.customer %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Payment status:</strong>
|
||||
<%= @transactions_sale.payment_status %>
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<strong>Sale status:</strong>
|
||||
<%= @transactions_sale.sale_status %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Total amount:</strong>
|
||||
<%= @transactions_sale.total_amount %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Total discount:</strong>
|
||||
<%= @transactions_sale.total_discount %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Total tax:</strong>
|
||||
<%= @transactions_sale.total_tax %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Tax type:</strong>
|
||||
<%= @transactions_sale.tax_type %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Grand total:</strong>
|
||||
<%= @transactions_sale.grand_total %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Rounding adjustment:</strong>
|
||||
<%= @transactions_sale.rounding_adjustment %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Amount received:</strong>
|
||||
<%= @transactions_sale.amount_received %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Amount changed:</strong>
|
||||
<%= @transactions_sale.amount_changed %>
|
||||
</p>
|
||||
|
||||
<%= link_to 'Edit', edit_transactions_sale_path(@transactions_sale) %> |
|
||||
<%= link_to 'Back', transactions_sales_path %>
|
||||
|
||||
Reference in New Issue
Block a user