Skip to content

Commit

Permalink
FIX: correct display of percentages (#1622)
Browse files Browse the repository at this point in the history
* FIX: correct display of percentages

* FIX: correct display of percentages

* FIX: correct display of percentages
  • Loading branch information
MrTob authored Jan 17, 2025
1 parent aac9e5e commit ae9287e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/family.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def snapshot_transactions

savings << {
date: r.date,
value: r.rolling_income != 0 ? (r.rolling_income - r.rolling_spend) / r.rolling_income : 0.to_d
value: r.rolling_income != 0 ? ((r.rolling_income - r.rolling_spend) / r.rolling_income) : 0.to_d
}
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<%= render partial: "shared/value_heading", locals: {
label: t(".savings_rate"),
period: Period.last_30_days,
value: @savings_rate_series.last&.value,
value: (@savings_rate_series.last&.value)*100,
trend: @savings_rate_series.trend,
is_percentage: true
} %>
Expand Down

0 comments on commit ae9287e

Please sign in to comment.