saucy/app/views/contributions/due.html.erb

32 lines
1.0 KiB
Plaintext

<h1><%= t 'contributions.due.title' %></h1>
<% @due_contributions.each do |(year, contributions)| %>
<h2><%= year %></h2>
<table class='zebra'>
<tr>
<th><%= t('members.attributes.display_name') %></th>
<th><%= t('members.attributes.expires_on') %></th>
<th><%= t('members.attributes.category') %></th>
<th><%= t('contributions.attributes.amount') %></th>
</tr>
<% contributions.each do |contribution| %>
<tr>
<td>
<%= link_to contribution.member do %><%= contribution.member.number %>. <%= contribution.member.display_name %><% end %>
</td>
<td><%= contribution.member.expires_on %></td>
<td><%= contribution.member.category %></td>
<td><%= number_to_currency(contribution.amount, unit: "€") %></td>
</tr>
<% end %>
<tfoot>
<tr>
<th>Total</th>
<th></th>
<th></th>
<th><%= number_to_currency(contributions.map(&:amount).sum, unit: "€") %></th>
</tr>
</tfoot>
</table>
<% end %>