4 <%= form_for @dividend, :url=>{action: :create}, :method=>:POST do |f| %>
5 <fieldset id='dividend'>
6 <legend>New Dividend Payment</legend>
7 <%= f.hidden_field :id %>
8 <%= f.select :id_stock, options_from_collection_for_select(@securities, 'id', 'name'), prompt: '-- Select Security --' %><br/>
9 <%= f.date_field :time, :placeholder=>'Date payment received' %><br/>
10 <%= f.number_field :received, :placeholder=>'Amount received (per share)', :step=>0.0001, :min=>0.0001 %><br/>
12 <%= f.submit 'Save Payment Received' %>
19 <%= form_tag({:action=>'index'}, method: :get) do %>
21 <%= select_tag 'filter', options_for_select(@log.filters, @filter) , prompt: '-- Filter --' %>
22 <%= select_tag 'start_date', options_for_select(@timeframes, @timeframe) , prompt: '-- Time Frame --' %>
23 <%= submit_tag 'Run Report' %>
27 <% if not @log.empty? %>
28 <p>Total Cashflow in Report: <em><%= smr_humanize(@log.total) %></em></p>
33 <tr><th>Date</th><th></th><th>Cashflow</th></tr>
36 <% @log.each do |item| %>
38 <td><%= smr_humanize(item.date) %></td>
39 <td><%= item.what %> <em><%= item.comment %></em></td>
40 <td><%= smr_humanize(item.total) %></td>