added total by account on xls
This commit is contained in:
@@ -78,13 +78,19 @@
|
||||
total_item_dis += sale.grand_total*(-1)
|
||||
end %>
|
||||
<% if !acc_arr.include?(sale.account_id) %>
|
||||
|
||||
<% @totalByAccount.each do |account, total| %>
|
||||
<% if sale.account_id == account %>
|
||||
|
||||
<% grand_total += total %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td><b><%= sale.account_name %></b></td>
|
||||
<td colspan="4"> </td>
|
||||
<td><%= t("views.right_panel.detail.total_price_by") %> <%= sale.account_name %></td>
|
||||
<td>
|
||||
<% @totalByAccount.each do |account, total| %>
|
||||
<% if sale.account_id == account %>
|
||||
<b><%= number_format(total, precision:precision.to_i,delimiter:delimiter) %></b>
|
||||
<% grand_total += total %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% acc_arr.push(sale.account_id) %>
|
||||
<% end %>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user