diff --git a/app/views/credit_card_bills/_credit_card_bill.html.erb b/app/views/credit_card_bills/_credit_card_bill.html.erb index df91f34..a68153c 100644 --- a/app/views/credit_card_bills/_credit_card_bill.html.erb +++ b/app/views/credit_card_bills/_credit_card_bill.html.erb @@ -1,48 +1,149 @@ -
- Description: - <%= credit_card_bill.description %> -
+Total Bill
+<%= number_to_currency(credit_card_bill.amount) %>
+Accounted For
+<%= number_to_currency(Expense.credit_card_monthly_total) %>
+Unpaid Balance
+<%= number_to_currency(credit_card_bill.unpaid) %>
+- Amount: - <%= credit_card_bill.amount %> -
- -- Accounted For: - <%= Expense.credit_card_monthly_total %> -
- -- Unpaid: - <%= credit_card_bill.unpaid %> -
- --
Member | -Burden Percent | -Burden Amount | -||||||
---|---|---|---|---|---|---|---|---|
<%= member.name %> | -<%= member.burden_percent * 100 %>% | -<%= number_to_currency(member.burden_amount(total_amount: credit_card_bill.unpaid)) %> | + +
Member | +Burden % | +Amount Owed |
---|
<%= member.name %>
+<%= member.name %>
++ <%= number_to_currency(member.burden_amount(total_amount: credit_card_bill.unpaid)) %> +
+Enter the details for this credit card statement
+A description to identify this credit card bill
+Total amount on the credit card statement
+Auto-calculated unpaid amount
+Based on total minus accounted expenses
+Update the details for this credit card bill.
+<%= notice %>
++ + <%= notice %> +
+Track and manage your credit card expenses and member burdens
+Total Bills
+<%= @credit_card_bills.count %>
+Total Amount
+<%= number_to_currency(@credit_card_bills.sum(:amount)) %>
+Unbudgeted
+<%= number_to_currency(@credit_card_bills.sum(&:unpaid)) %>
+Description | +Total Amount | +Unbudgeted | +Actions | +
---|---|---|---|
+ <%= bill.description %>
+ |
+ + <%= number_to_currency(bill.amount) %> + | ++ <%= number_to_currency(bill.unpaid) %> + | ++ <%= link_to "View", bill, class: "text-blue-600 hover:text-blue-900 mr-3" %> + <%= link_to "Edit", edit_credit_card_bill_path(bill), class: "text-indigo-600 hover:text-indigo-900" %> + | +
Get started by creating a new credit card bill.
+Add a new credit card bill to track member expenses and burden distribution.
+<%= notice %>
- <% end %> - - <%= render @credit_card_bill %> - - <%= link_to 'Edit this credit card bill', edit_credit_card_bill_path(@credit_card_bill), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> -+ + <%= notice %> +
Member | -Burden Percent | -Burden Amount | -||||||
---|---|---|---|---|---|---|---|---|
<%= member.name %> | -<%= member.burden_percent * 100 %>% | -<%= number_to_currency(member.burden_amount) %> | +
Member | +Burden Percent | +Burden Amount |
---|
Member | -For | -Amount | -Included | -||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
<%= income.member.name %> | -<%= income.description %> | -<%= number_to_currency(income.amount) %> | -<%= income.included %> | +
Member | +For | +Amount | +Included |
---|
Bill | -Payment | -Period | -Montly | -credit_card | -Estimated | -||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<%= expense.description %> | -<%= number_to_currency(expense.payment) %> | -<%= expense.period %> | -<%= number_to_currency(expense.monthly) %> | -<%= expense.credit_card %> | -<%= expense.estimated %> | +
Bill | +Payment | +Monthly | +
---|
- Description: - <%= expense.description %> -
+Payment Amount
+<%= number_to_currency(expense.payment) %>
+Monthly Amount
+<%= number_to_currency(expense.monthly) %>
+- Payment: - <%= expense.payment %> -
- -- Period: - <%= expense.period %> -
- -- Credit card: - <%= expense.credit_card %> -
- -- Estimated: - <%= expense.estimated %> -
+Details
+A brief description of the expense
+The payment amount for this billing period
+How often this expense is billed
+This expense is paid by credit card
+This amount is an estimate
+Update the details for this expense.
+<%= notice %>
++ + <%= notice %> +
+Description | +Payment | +Monthly | +Details | +Actions | +
---|---|---|---|---|
+ <%= expense.description %>
+ |
+ + <%= number_to_currency(expense.payment) %> + | ++ <%= number_to_currency(expense.monthly) %> + | +
+
+
+ <%= expense.period.downcase %>
+
+ <% if expense.credit_card %>
+ credit card
+ <% end %>
+ <% if expense.estimated %>
+ estimated
+ <% end %>
+
+ |
+ + <%= link_to "View", expense, class: "text-blue-600 hover:text-blue-900 mr-3" %> + <%= link_to "Edit", edit_expense_path(expense), class: "text-indigo-600 hover:text-indigo-900" %> + | +
Payment
+<%= number_to_currency(expense.payment) %>
+Monthly
+<%= number_to_currency(expense.monthly) %>
+Get started by creating a new expense.
+Add a new recurring expense to track your spending.
+<%= notice %>
- <% end %> - - <%= render @expense %> - - <%= link_to 'Edit this expense', edit_expense_path(@expense), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> -+ + <%= notice %> +
Whether this income should be included in budget calculations
+- Description: - <%= income.description %> -
+<%= income.member.name %>
+Member
+<%= number_to_currency(income.amount) %>
+Amount
+- Included: - <%= income.included %> -
- -- Amount: - <%= income.amount %> -
- -- Member: - <%= income.member_id %> -
- - <% if action_name != "show" %> - <%= link_to "Show this income", income, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> - <%= link_to 'Edit this income', edit_income_path(income), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %> -Update the details for "<%= @income.description %>"
+<%= notice %>
++ + <%= notice %> +
+Track member income sources and budget allocations
+Total Sources
+<%= @incomes.count %>
+Total Income
+<%= number_to_currency(@incomes.sum(:amount)) %>
+Included
+<%= number_to_currency(@incomes.where(included: true).sum(:amount)) %>
+Excluded
+<%= number_to_currency(@incomes.where(included: false).sum(:amount)) %>
+Description | +Member | +Amount | +Status | +Actions | +
---|---|---|---|---|
+ <%= income.description %>
+ |
+
+
+
+
+ <%= income.member.name.first.upcase %>
+
+
+
+ <%= income.member.name %> + |
+ + <%= number_to_currency(income.amount) %> + | ++ <% if income.included %> + included + <% else %> + excluded + <% end %> + | ++ <%= link_to "View", income, class: "text-blue-600 hover:text-blue-900 mr-3" %> + <%= link_to "Edit", edit_income_path(income), class: "text-indigo-600 hover:text-indigo-900" %> + | +
Get started by adding your first income source.
+Add a new income source to your budget
+<%= notice %>
- <% end %> - - <%= render @income %> - - <%= link_to 'Edit this income', edit_income_path(@income), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> -+ + <%= notice %> +
+Income source details and budget allocation
+<%= @income.member.name %>
+<%= number_to_currency(@income.amount) %>
+Whether this member contributes financially to the household budget
+- Name: - <%= member.name %> -
+Household Member
+- Pays: - <%= member.pays %> -
- - <% if action_name != "show" %> - <%= link_to "Show this member", member, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> - <%= link_to 'Edit this member', edit_member_path(member), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %> -Update the details for "<%= @member.name %>"
+<%= notice %>
++ + <%= notice %> +
+Manage household members and their budget roles
+Total Members
+<%= @members.count %>
+Contributing
+<%= @members.where(pays: true).count %>
+Non-Contributing
+<%= @members.where(pays: false).count %>
+Member | +Role | +Actions | +
---|---|---|
+
+
+
+ <%= member.name.first.upcase %>
+
+
+
+ <%= member.name %>
+ |
+ + <% if member.pays %> + contributing + <% else %> + non-contributing + <% end %> + | ++ <%= link_to "View", member, class: "text-blue-600 hover:text-blue-900 mr-3" %> + <%= link_to "Edit", edit_member_path(member), class: "text-indigo-600 hover:text-indigo-900" %> + | +
Get started by adding your first household member.
+Add a new household member and set their budget role
+<%= notice %>
- <% end %> - - <%= render @member %> - - <%= link_to 'Edit this member', edit_member_path(@member), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> -+ + <%= notice %> +
+Household member details and budget role
+Household Member
+