update report detail ,close_cashire_pdf and view reports

This commit is contained in:
Aung Myo
2017-07-21 09:57:22 +06:30
parent 3792133aad
commit a0edef735d
20 changed files with 150 additions and 232 deletions

View File

@@ -1,11 +1,24 @@
<div class="container margin-top-20">
<!-- <div class="span11">
<div id="report_container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
</div> -->
<div class="card row">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<% if params[:from]%>
<tr>
<th colspan="7">From Date : <%= params[:from] rescue '-'%> ,To Date : <%= params[:to] rescue '-'%></th>
</tr>
<tr>
<th colspan="7"> From Date : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %>
- To Date : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%>
</th>
</tr>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<th colspan="7">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
@@ -57,7 +70,7 @@
<!-- <td><%= sprintf "%.2f",result.rounding_adj.to_f.to_d rescue '-'%></td> -->
<% grand_total = result.grand_total.to_f %>
<td><%= sprintf "%.2f",grand_tota.to_f.to_d rescue '-'%></td>
<!-- <td><%= sprintf "%.2f",grand_tota.to_f.to_d rescue '-'%></td> -->
</tr>
<% cash += result.cash_sales.to_f %>
<% credit += result.credit_sales.to_f %>
@@ -78,9 +91,10 @@
<td><b><%= sprintf("%.2f",card) rescue '-'%></b></td>
<!-- <td><b><%= sprintf("%.2f",total) rescue '-'%></b></td> -->
<!-- <td><b><%= sprintf("%.2f",rounding_adj) rescue '-'%></b></td> -->
<td><b><%= sprintf("%.2f",g_total) rescue '-'%></b></td>
<td><b><%= sprintf("%.2f",g_total) rescue '-'%></b></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>