This commit is contained in:
Zoey
2019-06-26 11:42:51 +06:30
parent 56b8115ac9
commit 79d8eb94ef
17 changed files with 306 additions and 78 deletions

View File

@@ -45,6 +45,9 @@
<% if @payment_methods.include? ("UNIONPAY") %>
<th style='text-align:center;' class="d-none d-sm-table-cell"><%= t("views.right_panel.detail.unionpay_sales") %></th>
<% end %>
<% if @payment_methods.include? ("KBZPay") %>
<th style='text-align:center;' class="d-none d-sm-table-cell"><%= t("views.right_panel.detail.kbzpay_sales") %></th>
<% end %>
<% if @payment_methods.include? ("Alipay") %>
<th style='text-align:center;' class="d-none d-sm-table-cell"><%= t("views.right_panel.detail.alipay_sales") %></th>
<% end %>
@@ -104,6 +107,7 @@
<% credit = 0 %>
<% foc = 0 %>
<% discount = 0 %>
<% kbzpay = 0 %>
<% total = 0 %>
<% grand_total = 0 %>
<% old_grand_total = 0 %>
@@ -125,6 +129,7 @@
<% credit += sale[:credit_amount] %>
<% foc += sale[:foc_amount] %>
<% discount += sale[:total_discount] %>
<% kbzpay += sale[:kbzpay_amount] %>
<% total += sale[:grand_total].to_f + sale[:rounding_adj].to_f %>
<% grand_total += sale[:grand_total].to_f %>
<% old_grand_total += sale[:old_grand_total].to_f %>
@@ -151,6 +156,9 @@
<% if @payment_methods.include? ("Alipay") %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(sale[:alipay_amount], precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("KBZPay") %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(sale[:kbzpay_amount], precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("PAYMAL") %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(sale[:paymal_amount], precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
@@ -216,6 +224,12 @@
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(alipay, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("KBZPay") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(kbzpay, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("PAYMAL") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>