Update and connect to drone (#1)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #1
This commit is contained in:
parent
0887a5f6b9
commit
fd75a7c6ff
17 changed files with 215 additions and 170 deletions
|
@ -1,5 +1,5 @@
|
|||
class Member < ApplicationRecord
|
||||
has_many :incomes
|
||||
has_many :incomes, dependent: :destroy
|
||||
|
||||
def income
|
||||
incomes.sum(&:amount)
|
||||
|
@ -15,6 +15,8 @@ class Member < ApplicationRecord
|
|||
|
||||
def burden_percent
|
||||
((Income.total - others_included_income) / Income.total).round(2)
|
||||
rescue
|
||||
0
|
||||
end
|
||||
|
||||
def burden_amount(total_amount: Expense.monthly_total)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue