129 lines
4.8 KiB
Plaintext
Executable File
129 lines
4.8 KiB
Plaintext
Executable File
<!-- <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="page-header">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
|
<li class="breadcrumb-item active">Credit Note</li>
|
|
<span class="float-right">
|
|
<%= link_to 'Back', dashboard_path %>
|
|
</span>
|
|
</ol>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
|
<div class="main-box-body clearfix p-l-5 p-r-5">
|
|
<div class="table-responsive">
|
|
<table class="table table-">
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="">
|
|
<%= form_tag transactions_credit_notes_path, :method => :get do %>
|
|
<div class="row clearfix">
|
|
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
|
|
<label class="font-14">Enter Keywords</label>
|
|
<input type="text" name="receipt_no" class="form-control m-t-3" placeholder="Receipt No/Cashier Name/Status" style="margin-right: 10px">
|
|
</div>
|
|
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
|
|
<label class="font-14">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="col-lg-2 col-md-2 col-sm-2 col-xs-2">
|
|
<label class="font-14">From</label>
|
|
<input class="form-control datepicker m-t-3" name="from" id="date" type="text" placeholder="From date">
|
|
</div>
|
|
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
|
|
<label class="font-14">To</label>
|
|
<input class="form-control datepicker m-t-3" name="to" id="date" type="text" placeholder="To date">
|
|
</div>
|
|
|
|
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
|
|
<label class="font-14"> </label><br>
|
|
<input type="submit" value="Search" class='btn btn-primary btn-md'>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
</div>
|
|
<div class="card">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<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>
|
|
</div>
|
|
<!--
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
|
|
$('.datepicker').datepicker({
|
|
format : 'dd-mm-yyyy',
|
|
autoclose: true
|
|
});
|
|
$('.datepicker').attr('ReadOnly','true');
|
|
$('.datepicker').css('cursor','pointer');
|
|
|
|
|
|
});
|
|
</script> -->
|
|
|
|
|
|
|
|
|
|
|