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

EXPENSE REPORT

<%= link_to "New Expense", new_expense_path, class: "btn-simple" %>
Today's Expense
<%= number_to_currency(@daily_expense || 0, unit: "₹") %>
This Week
<%= number_to_currency(@weekly_expense || 0, unit: "₹") %>
This Month
<%= number_to_currency(@monthly_expense || 0, unit: "₹") %>

Today's Expenses

<% (@daily_expense_items || []).each do |expense| %> <% end %> <% if (@daily_expense_items || []).empty? %> <% end %>
TitleAmountDateDescription
<%= expense.title %> <%= number_to_currency(expense.amount, unit: "₹") %> <%= expense.date.strftime("%d %b %Y") %> <%= expense.description %>
No expense for today.
Total <%= number_to_currency(@daily_expense || 0, unit: "₹") %>

This Week's Expenses

<% (@weekly_expense_items || []).each do |expense| %> <% end %> <% if (@weekly_expense_items || []).empty? %> <% end %>
TitleAmountDateDescription
<%= expense.title %> <%= number_to_currency(expense.amount, unit: "₹") %> <%= expense.date.strftime("%d %b %Y") %> <%= expense.description %>
No expense for this week.
Total <%= number_to_currency(@weekly_expense || 0, unit: "₹") %>

This Month's Expenses

<% (@monthly_expense_items || []).each do |expense| %> <% end %> <% if (@monthly_expense_items || []).empty? %> <% end %>
TitleAmountDateDescription
<%= expense.title %> <%= number_to_currency(expense.amount, unit: "₹") %> <%= expense.date.strftime("%d %b %Y") %> <%= expense.description %>
No expense for this month.
Total <%= number_to_currency(@monthly_expense || 0, unit: "₹") %>