Add extra bills tracking
This commit is contained in:
parent
a21639ff6f
commit
63487a9cba
22 changed files with 353 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue