41 lines
1.4 KiB
Plaintext
Executable File
41 lines
1.4 KiB
Plaintext
Executable File
|
|
<div class="margin-top-20">
|
|
<div class="card ">
|
|
<% unless @sale_data.blank? %>
|
|
|
|
<table class="table table-striped" border="0">
|
|
<thead>
|
|
<% if !params[:from].blank?%>
|
|
<tr>
|
|
<th colspan="7"><%= t("views.right_panel.detail.from_date") %> : <%= params[:from] rescue '-'%> , <%= t("views.right_panel.detail.to_date") %> : <%= params[:to] rescue '-'%></th>
|
|
</tr>
|
|
<% end %>
|
|
<tr>
|
|
<th> <%= t("views.right_panel.detail.shift_name") %> </th>
|
|
<th> <%= t("views.right_panel.detail.receipt_no") %></th>
|
|
<th> <%= t :cashier %> <%= t("views.right_panel.detail.name") %></th>
|
|
<th> <%= t :customer %> <%= t("views.right_panel.detail.name") %></th>
|
|
<th> <%= t("views.right_panel.detail.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>
|