1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00

FIX: correct display of percentages (#1622)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

* FIX: correct display of percentages

* FIX: correct display of percentages

* FIX: correct display of percentages
This commit is contained in:
tlink 2025-01-17 17:21:00 +01:00 committed by GitHub
parent aac9e5eca2
commit ae9287ec9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -149,7 +149,7 @@ class Family < ApplicationRecord
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

View file

@ -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
} %>