update search and crm
This commit is contained in:
@@ -1,59 +1,84 @@
|
||||
<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="<%= transactions_sales_path %>">Sale</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1>Transactions Sales</h1>
|
||||
<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>
|
||||
<td colspan="8">
|
||||
<%= form_tag transactions_sales_path, :method => :get do %>
|
||||
<div class="input-append form-group pull-right col-md-6">
|
||||
<!-- <input class="datepicker col-md-3 form-control" name="date" id="date" type="text" placeholder="Receipt date" style="margin-right: 10px"> -->
|
||||
|
||||
<input type="text" name="receipt_no" class="col-md-6 form-control" placeholder="Receipt No" style="margin-right: 10px">
|
||||
<button type="submit" class="btn btn-primary btn">Search</button>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sale Id </th>
|
||||
<th>Receipt no </th>
|
||||
<th>Grand total</th>
|
||||
<th>Tax amount</th>
|
||||
<th>Cashier</th>
|
||||
<th>Sales status</th>
|
||||
<th>Receipt Date</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cashier</th>
|
||||
<th>Cashier name</th>
|
||||
<th>Requested by</th>
|
||||
<th>Requested at</th>
|
||||
<th>Receipt no</th>
|
||||
<th>Receipt date</th>
|
||||
<th>Customer</th>
|
||||
<th>Payment status</th>
|
||||
<th>Sale status</th>
|
||||
<th>Total amount</th>
|
||||
<th>Total discount</th>
|
||||
<th>Total tax</th>
|
||||
<th>Tax type</th>
|
||||
<th>Grand total</th>
|
||||
<th>Rounding adjustment</th>
|
||||
<th>Amount received</th>
|
||||
<th>Amount changed</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @sales.each do |sale| %>
|
||||
|
||||
<tbody>
|
||||
<% @transactions_sales.each do |transactions_sale| %>
|
||||
<tr>
|
||||
<td><%= transactions_sale.cashier %></td>
|
||||
<td><%= transactions_sale.cashier_name %></td>
|
||||
<td><%= transactions_sale.requested_by %></td>
|
||||
<td><%= transactions_sale.requested_at %></td>
|
||||
<td><%= transactions_sale.receipt_no %></td>
|
||||
<td><%= transactions_sale.receipt_date %></td>
|
||||
<td><%= transactions_sale.customer %></td>
|
||||
<td><%= transactions_sale.payment_status %></td>
|
||||
<td><%= transactions_sale.sale_status %></td>
|
||||
<td><%= transactions_sale.total_amount %></td>
|
||||
<td><%= transactions_sale.total_discount %></td>
|
||||
<td><%= transactions_sale.total_tax %></td>
|
||||
<td><%= transactions_sale.tax_type %></td>
|
||||
<td><%= transactions_sale.grand_total %></td>
|
||||
<td><%= transactions_sale.rounding_adjustment %></td>
|
||||
<td><%= transactions_sale.amount_received %></td>
|
||||
<td><%= transactions_sale.amount_changed %></td>
|
||||
<td><%= link_to 'Show', transactions_sale %></td>
|
||||
<td><%= link_to 'Edit', edit_transactions_sale_path(transactions_sale) %></td>
|
||||
<td><%= link_to 'Destroy', transactions_sale, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<tr>
|
||||
<td><%= sale.sale_id %></td>
|
||||
<td><%= sale.receipt_no %></td>
|
||||
<td><%= sale.grand_total rescue '-' %></td>
|
||||
<td><%= sale.total_tax %></td>
|
||||
<td><%= sale.cashier_name rescue '-' %></td>
|
||||
<td> <%= sale.sale_status %> </td>
|
||||
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
|
||||
<td><%= link_to 'Show', transactions_sale_path(sale) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
$('.datepicker').datepicker({
|
||||
format : 'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
$('.datepicker').attr('ReadOnly','true');
|
||||
$('.datepicker').css('cursor','pointer');
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%= link_to 'New Transactions Sale', new_transactions_sale_path %>
|
||||
|
||||
Reference in New Issue
Block a user