<table class="table table-striped table-hover">
  <caption class="text-left"><b><%=name%></b></caption>
  <thead>
  <tr>
    <th></th>
    <th></th>
  </tr>
  </thead>
<% if accounts.count > 0%>
  <tbody>
    <% accounts.each do |account| %>
      <tr class="<%= cycle("even", "odd") -%>">
        <td><%=h account.name %></td>
        <td><%=h account.balance(:from_date => @from_date, :to_date => @to_date) %></td>
      </tr>
    <% end %>
  </tbody>
<% end %>
</table>

<table class="table table-striped table-hover">
  <caption class="text-left"><b><%=name%></b></caption>
  <thead>
  <tr>
    <th></th>
    <th></th>
  </tr>
  </thead>
<% if accounts.count > 0%>
  <tbody>
    <% running_total = 0 %>
    <% accounts.each do |account| %>
      <% balance = account.balance(:from_date => @from_date, :to_date => @to_date) %>
      <tr class="<%= cycle("even", "odd") -%>">
        <td><%=h account.name %></td>
        <td><%=h balance.round(2) %></td>
        <% running_total += balance %>
      </tr>
    <% end %>
    <tr class="<%= cycle("even", "odd") -%>">
      <strong>
        <td>Total <%= name %></td>
        <td><%= running_total.round(2) %></td>
      </strong>
    </tr>
  </tbody>
<% end %>
</table>

Add totals sections to balance sheet and income statement.
Add totals sections to balance sheet and income statement.
