<% content_for :title, "Income Report" %>

INCOME REPORT

<%= link_to "New Income", new_income_path, class: "btn-simple" %>
Today's Income
<%= number_to_currency(@daily_income || 0, unit: "₹") %>
This Week
<%= number_to_currency(@weekly_income || 0, unit: "₹") %>
This Month
<%= number_to_currency(@monthly_income || 0, unit: "₹") %>

Today's Income

<% (@daily_income_items || []).each do |income| %> <% end %> <% if (@daily_income_items || []).empty? %> <% end %>
AmountDate
<%= number_to_currency(income.amount, unit: "₹") %> <%= income.created_at.strftime("%d %b %Y") %>
No income for today.
Total<%= number_to_currency(@daily_income || 0, unit: "₹") %>

This Week's Income

<% (@weekly_income_items || []).each do |income| %> <% end %> <% if (@weekly_income_items || []).empty? %> <% end %>
AmountDate
<%= number_to_currency(income.amount, unit: "₹") %> <%= income.created_at.strftime("%d %b %Y") %>
No income for this week.
Total<%= number_to_currency(@weekly_income || 0, unit: "₹") %>

This Month's Income

<% (@monthly_income_items || []).each do |income| %> <% end %> <% if (@monthly_income_items || []).empty? %> <% end %>
AmountDate
<%= number_to_currency(income.amount, unit: "₹") %> <%= income.created_at.strftime("%d %b %Y") %>
No income for this month.
Total<%= number_to_currency(@monthly_income || 0, unit: "₹") %>