update report and view
This commit is contained in:
39
app/views/reports/credit_payment/index.xls.erb
Normal file
39
app/views/reports/credit_payment/index.xls.erb
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="container margin-top-20">
|
||||
<div class="card row">
|
||||
<% unless @sale_data.blank? %>
|
||||
|
||||
<table class="table table-striped" border="0">
|
||||
<thead>
|
||||
<% if !params[:from].blank?%>
|
||||
<tr>
|
||||
<th colspan="7">From Date : <%= params[:from] rescue '-'%> , To Date : <%= params[:to] rescue '-'%></th>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<th> Shift Name </th>
|
||||
<th> Receive No</th>
|
||||
<th> Cashier Name</th>
|
||||
<th> Customer Name</th>
|
||||
<th> Credit Amount </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @sale_data.each do |credit| %>
|
||||
|
||||
<tr>
|
||||
<% if @shift_from.nil? && @shift_to.nil? %>
|
||||
<td><%= credit.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%></td>
|
||||
<% else %>
|
||||
<td><%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%></td>
|
||||
<% end %>
|
||||
<td><%= credit.receipt_no rescue '-' %></td>
|
||||
<td><%= credit.cashier_name rescue '-' %></td>
|
||||
<td><%= credit.sale.customer.name rescue '-' %></td>
|
||||
<td><%= credit.payment_amount rescue '-' %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user