From ce597a24c2786523ed570cb05b4108e3be0c7aa1 Mon Sep 17 00:00:00 2001 From: "Benjamin Randolphgit config --global user.email neb417@gmail.comgit config --global init.defaultBranch maingit config --global core.editor atom" Date: Sat, 18 Nov 2023 15:50:50 -0700 Subject: [PATCH] Render on for salary on load --- app/views/budget/_salary_budget.html.erb | 6 ++++-- app/views/dashboard/index.html.erb | 3 ++- app/views/shared/_budget.html.erb | 14 +++++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/views/budget/_salary_budget.html.erb b/app/views/budget/_salary_budget.html.erb index d6f13e0..9be9edc 100644 --- a/app/views/budget/_salary_budget.html.erb +++ b/app/views/budget/_salary_budget.html.erb @@ -10,7 +10,9 @@ total_bi_weekly_cost: total_bi_weekly_cost, income: income, investing_amount: investing_amount, - savings_amount: savings_amount - } %> + savings_amount: savings_amount, + guilt_free: guilt_free + } + %> <% end %> diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 2e6eccf..8d6d111 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -43,7 +43,8 @@ total_monthly_cost: @total_monthly_cost, total_bi_weekly_cost: @total_bi_weekly_cost, income: @salary_taxed, investing_amount: @salary_invest, - savings_amount: @salary_saving + savings_amount: @salary_saving, + guilt_free: @guilt_free_salary } %> diff --git a/app/views/shared/_budget.html.erb b/app/views/shared/_budget.html.erb index e42b434..9a7a6da 100644 --- a/app/views/shared/_budget.html.erb +++ b/app/views/shared/_budget.html.erb @@ -9,7 +9,7 @@ <%= humanized_money_with_symbol(savings_amount.daily_saving) %>
- <%= humanized_money_with_symbol((income.daily_income) - total_annual_cost / 365) %> + <%= humanized_money_with_symbol((guilt_free.daily_guilt_free) - total_annual_cost / 365) %>
@@ -19,7 +19,7 @@
<%= humanized_money_with_symbol(investing_amount.weekly_saving) %>
<%= humanized_money_with_symbol(savings_amount.weekly_saving) %>
- <%= humanized_money_with_symbol((income.weekly_income) - total_annual_cost / 52) %> + <%= humanized_money_with_symbol((guilt_free.weekly_guilt_free) - total_annual_cost / 52) %>
@@ -29,7 +29,7 @@
<%= humanized_money_with_symbol(investing_amount.bi_weekly_saving) %>
<%= humanized_money_with_symbol(savings_amount.bi_weekly_saving) %>
- <%= humanized_money_with_symbol((income.bi_weekly_net_income) - total_bi_weekly_cost) %> + <%= humanized_money_with_symbol((guilt_free.bi_weekly_guilt_free) - total_bi_weekly_cost) %>
@@ -39,7 +39,7 @@
<%= humanized_money_with_symbol(investing_amount.monthly_saving) %>
<%= humanized_money_with_symbol(savings_amount.monthly_saving) %>
- <%= humanized_money_with_symbol((income.monthly_income) - total_monthly_cost) %> + <%= humanized_money_with_symbol((guilt_free.monthly_guilt_free) - total_monthly_cost) %>
@@ -49,7 +49,7 @@
<%= humanized_money_with_symbol(investing_amount.quarterly_saving) %>
<%= humanized_money_with_symbol(savings_amount.quarterly_saving) %>
- <%= humanized_money_with_symbol((income.quarterly_income) - total_annual_cost / 4) %> + <%= humanized_money_with_symbol((guilt_free.quarterly_guilt_free) - total_annual_cost / 4) %>
@@ -59,7 +59,7 @@
<%= humanized_money_with_symbol(investing_amount.biannual_saving) %>
<%= humanized_money_with_symbol(savings_amount.biannual_saving) %>
- <%= humanized_money_with_symbol((income.biannual_income) - total_annual_cost / 2) %> + <%= humanized_money_with_symbol((guilt_free.biannual_guilt_free) - total_annual_cost / 2) %>
@@ -70,6 +70,6 @@
<%= humanized_money_with_symbol(investing_amount.annual_saving) %>
<%= humanized_money_with_symbol(savings_amount.annual_saving) %>
- <%= humanized_money_with_symbol(income.total_net_income - total_annual_cost ) %> + <%= humanized_money_with_symbol(guilt_free.annual_guilt_free - total_annual_cost ) %>