Improve percent round

This commit is contained in:
Bertocq
2017-07-01 10:51:12 +02:00
committed by Javi Martín
parent be89289b09
commit 4b2a2dd995
2 changed files with 2 additions and 2 deletions

View File

@@ -186,7 +186,7 @@ class Budget
def calculate_percentage(fraction, total) def calculate_percentage(fraction, total)
percent = fraction / total.to_f percent = fraction / total.to_f
percent.nan? ? 0.0 : (percent * 100).round(2) percent.nan? ? 0.0 : (percent * 100).round(3)
end end
def supports(supportable) def supports(supportable)

View File

@@ -221,7 +221,7 @@
</tr> </tr>
<% end %> <% end %>
<tr id="headings_totals"> <tr id="headings_totals">
<td class="text-center border-left-success success"> <td class="border-left-success success">
<strong><%= t("budgets.stats.total").upcase %></strong> <strong><%= t("budgets.stats.total").upcase %></strong>
</td> </td>
<td id="total_spending_proposals_heading_total" <td id="total_spending_proposals_heading_total"