<%= credit_card_bill.description %>

Total Bill

<%= number_to_currency(credit_card_bill.amount) %>

Accounted For

<%= number_to_currency(Expense.credit_card_monthly_total) %>

<% if credit_card_bill.unpaid > 0 %> <% else %> <% end %>

Unpaid Balance

<%= number_to_currency(credit_card_bill.unpaid) %>

Member Burden Breakdown

Based on unpaid amount: <%= number_to_currency(credit_card_bill.unpaid) %>
<% Member.all.each do |member| %>
<%= member.name.first.upcase %>

<%= member.name %>

<%= (member.burden_percent * 100).round(1) %>%

<%= number_to_currency(member.burden_amount(total_amount: credit_card_bill.unpaid)) %>

<% end %>
<% if action_name != "show" %>
<%= link_to credit_card_bill, class: "inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" do %> View details <% end %> <%= link_to edit_credit_card_bill_path(credit_card_bill), class: "inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" do %> Edit bill <% end %>
<% end %>