<% if notice.present? %>

<%= notice %>

<% end %>

Incomes

Track member income sources and budget allocations

<%= link_to new_income_path, class: "rounded-lg py-2.5 px-4 sm:py-3 sm:px-5 bg-blue-600 hover:bg-blue-700 text-white font-medium transition-colors inline-flex items-center justify-center sm:justify-start" do %> New income <% end %>
<% if @incomes.any? %>

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)) %>

<% @incomes.each do |income| %>

<%= income.description %>

<%= link_to income, class: "text-blue-600 hover:text-blue-800" do %> <% end %> <%= link_to edit_income_path(income), class: "text-indigo-600 hover:text-indigo-800" do %> <% end %>
<%= income.member.name.first.upcase %>
<%= income.member.name %>
<%= number_to_currency(income.amount) %>
Budget Status <% if income.included %> included <% else %> excluded <% end %>
<% end %>
<% else %>

No income sources

Get started by adding your first income source.

<%= link_to new_income_path, class: "inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700" do %> New income <% end %>
<% end %>