change UI and query for dashboard and UI for Origami/Commissions

This commit is contained in:
phyusin
2017-11-23 11:56:49 +06:30
parent 86ec4c7c80
commit b64229aded
7 changed files with 120 additions and 101 deletions

View File

@@ -147,7 +147,11 @@
<% if payment.payment_method == 'mpu' || payment.payment_method == 'visa' || payment.payment_method == 'master' || payment.payment_method == 'jcb' %>
<tr>
<td>Card Sale : </td>
<td align="right"><%= @sale_data[0]['card'] %></td>
<td align="right">
<% @sale_data.each do |data| %>
<%= data["card"] %>
<% end %>
</td>
</tr>
<% else %>
<tr>
@@ -220,16 +224,16 @@
<table class="table">
<% if !@total_order.nil? %>
<tr>
<td>Total Order : </td>
<td align="right"><%= @total_order.total_order %></td>
<td width="40px">Total Order : </td>
<td align="right" width="60px" style="padding: 5px"><%= @total_order.total_order %></td>
</tr>
<% end %>
<% if !(@total_accounts.nil?) %>
<% @total_accounts.each do |account| %>
<tr>
<td><%= account.title %> (Account) : </td>
<td align="right">
<td width="40px"><%= account.title %> (Account) : </td>
<td align="right" width="60px" style="padding: 5px">
<% @account_data.each do |data| %>
<% acc = account.title %>
<%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %>
@@ -240,15 +244,15 @@
<% end %>
<% if !@top_items.nil? %>
<tr>
<td>Top Item : </td>
<td align="right"><%= @top_items.item_name %>
<br>( <%= @top_items.item_total_price %> )</td>
<td width="40px">Top Item : </td>
<td align="right" width="60px" style="padding: 5px"><%= @top_items.item_name %>
<br>(<%= @top_items.item_total_price %>)</td>
</tr>
<% end %>
<% if !@total_foc_items.nil? %>
<tr>
<td>Total FOC Item : </td>
<td align="right"><%= @total_foc_items %></td>
<td width="40px">Total FOC Item : </td>
<td align="right" width="60px" style="padding: 5px"><%= @total_foc_items %></td>
</tr>
<% end %>
</table>