Journal


<%= form_tag({:action => 'index'}, {:method => :get, :class => 'form-inline'}) do%>
Per page: <%= select_tag :limit, options_for_select([25, 100, 200, 300], selected: params[:limit]), class: 'form-control' %> Order: <%= select_tag :order, options_for_select(['descending', 'ascending'], selected: params[:order]), class: 'form-control' %>
<% end %>
<% @entries.each do |entry| %> "> <% entry.debit_amounts.each do |debit_amount| %> "> <% end %> <% entry.credit_amounts.each do |credit_amount| %> "> <% end %> "> <% end %>
Description Debits Credits Date
<%=h entry.description %> <%=h entry.created_at %>
    <%=h "#{debit_amount.account.name}" %> <%=h debit_amount.amount.round(2) %>
        <%=h "#{credit_amount.account.name}" %> <%=h credit_amount.amount.round(2) %>
<%= paginate @entries %>