Improve percent round
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user