Add extra bills tracking

This commit is contained in:
Andrew Tomaka 2023-02-24 19:08:12 -05:00
parent a21639ff6f
commit 63487a9cba
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
22 changed files with 353 additions and 3 deletions

View file

@ -17,7 +17,7 @@ class Member < ApplicationRecord
((Income.total - others_included_income) / Income.total).round(2)
end
def burden_amount
burden_percent * Expense.all.map(&:monthly).sum.round(2)
def burden_amount(total_amount: Expense.monthly_total)
burden_percent * total_amount
end
end