fixed payment methods & license

This commit is contained in:
NyanLinHtut
2020-06-10 18:12:15 +06:30
parent f9db23b500
commit f6a35d214f
23 changed files with 187 additions and 202 deletions

View File

@@ -116,12 +116,14 @@
<% end %>
<% end %>
<% total_card = @sale_data.select { |hash| hash["card"]!=nil }.first %>
<% total_card = @sale_data.select { |hash| hash["card"]!=nil } %>
<% if !total_card.nil? %>
<tr>
<td><%= t("views.right_panel.detail.other_payment") %> : </td>
<td align="right">
<%= total_card["card"].to_f %>
<% total_other_amt = 0 %>
<% @sale_data.map { |k,v| k.map{|meth,amt| meth != 'cash' && meth != 'foc' && meth != 'creditnote' ? total_other_amt += amt : meth }} %>
<%= total_other_amt %>
</td>
</tr>
<% end %>