Update and connect to drone #1

Merged
atomaka merged 11 commits from deploy into main 2023-03-08 19:25:28 -05:00
Showing only changes of commit fe99fbc9de - Show all commits

View file

@ -1,5 +1,5 @@
class Member < ApplicationRecord class Member < ApplicationRecord
has_many :incomes has_many :incomes, dependent: :destroy
def income def income
incomes.sum(&:amount) incomes.sum(&:amount)
@ -15,6 +15,8 @@ class Member < ApplicationRecord
def burden_percent def burden_percent
((Income.total - others_included_income) / Income.total).round(2) ((Income.total - others_included_income) / Income.total).round(2)
rescue
0
end end
def burden_amount(total_amount: Expense.monthly_total) def burden_amount(total_amount: Expense.monthly_total)