108 lines
3.9 KiB
Plaintext
108 lines
3.9 KiB
Plaintext
<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_credit_notes_path %>">Credit Note</a>
|
|
</li>
|
|
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<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_credit_notes_path, :method => :get do %>
|
|
<div class="form-group col-md-4">
|
|
<label>Enter Keywords</label>
|
|
<input type="text" name="receipt_no" class="form-control" placeholder="Receipt No/Cashier Name/Status" style="margin-right: 10px">
|
|
</div>
|
|
<div class="form-group col-md-2">
|
|
<label>Select Customer</label>
|
|
<select class="selectpicker form-control col-md-12" name="customer" style="height: 40px" >
|
|
<option value="">Select Customer</option>
|
|
<% @customers.each do |customer| %>
|
|
<option value="<%= customer.customer_id %>">
|
|
<%= customer.name %></option>
|
|
<%end %>
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-md-2">
|
|
<label class="">From</label>
|
|
<input class="form-control datepicker" name="from" id="date" type="text" placeholder="From date">
|
|
</div>
|
|
<div class="form-group col-md-2">
|
|
<label class="">To</label>
|
|
<input class="form-control datepicker" name="to" id="date" type="text" placeholder="To date">
|
|
</div>
|
|
|
|
<div class="form-group col-md-1">
|
|
<label> </label>
|
|
<input type="submit" value="Search" class='btn btn-primary btn-md'>
|
|
</div>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Sale Id </th>
|
|
<th>Receipt no </th>
|
|
<th>Credit Amount</th>
|
|
<th>Cashier</th>
|
|
<th>Customer Name</th>
|
|
<th>Receipt Date</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% if @sales != 0 %>
|
|
|
|
<% @sales.each do |sale| %>
|
|
<tr>
|
|
<td><%= link_to sale.sale_id, transactions_sale_path(sale) %></td>
|
|
<td><%= sale.receipt_no %></td>
|
|
<td><%credit = SalePayment.where('sale_id = ? AND payment_method=?', sale.sale_id,"creditnote").first %>
|
|
<%= credit.payment_amount rescue '-' %>
|
|
</td>
|
|
<td><%= sale.cashier_name rescue '-' %></td>
|
|
<td><%= link_to sale.customer.name, crm_customer_path(sale.customer_id) %></td>
|
|
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
|
|
</tr>
|
|
<% end %>
|
|
<% else %>
|
|
<tr><td colspan="8"><strong><p style="text-align: center">There is no data for search....</p></strong></td></tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<br>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<!--
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
|
|
$('.datepicker').datepicker({
|
|
format : 'dd-mm-yyyy',
|
|
autoclose: true
|
|
});
|
|
$('.datepicker').attr('ReadOnly','true');
|
|
$('.datepicker').css('cursor','pointer');
|
|
|
|
|
|
});
|
|
</script> -->
|
|
|
|
|
|
|
|
|
|
|