1 <div class="overview_container">
2 <table id="overview_gain">
4 <tr><th colspan="2">Gain</th></tr>
7 <% if position.is_closed? and not position.is_viewed_before_closure? %>
8 <tr><td>Purchased Volume</td><td><%= smr_humanize(position.purchase_volume) %></td></tr>
9 <tr><td>Settled Volume</td><td><%= smr_humanize(position.settled_volume) %></td></tr>
11 <td>= <%= smr_profitloss_status(position.profit_loss) %></td>
12 <td class="<%= smr_profitloss_status(position.profit_loss, :css=>true) %>">
13 <%= smr_humanize(position.profit_loss) %>
14 <span><%= percentage_change(position.purchase_volume, position.settled_volume) %></span>
18 <tr><td>Invested Money</td><td><%= smr_humanize(position.invested) %></td></tr>
19 <tr><td>Market Value</td><td><%= smr_humanize(position.market_value) %></td></tr>
21 <td>= <%= smr_profitloss_status(position.profit_loss) %></td>
22 <td class="<%= smr_profitloss_status(position.profit_loss, :css=>true) %>">
23 <%= smr_humanize(position.profit_loss) %>
24 <span><%= percentage_change(position.invested, position.market_value)%></span>
30 <td><%= smr_humanize(position.charges*-1) %>
31 <span><%= if position.is_closed? then
32 percentage_of(position.purchase_volume, position.charges)
33 else percentage_of(position.invested, position.charges) end%></span>
37 <td><%= case position.security.type.to_sym
38 when :stock then 'Dividend Received'
39 when :bond then 'Coupons Received'
40 when :fund then 'Distributions Received'
43 <td><%= smr_humanize(position.dividend.received) %>
44 <% if position.is_closed? and not position.is_viewed_before_closure? %>
45 <span><%= percentage_of(position.purchase_volume, position.dividend.received) %>b</span>
47 <span><%= percentage_of(position.invested, position.dividend.received)%></span>
51 <tr><td>Accrued Interest Balance</td><td><%= smr_humanize(position.accrued_interest) %></td></tr>
54 <td class="<%= smr_profitloss_status(position.gain, :css=>true) %>">
55 <%= smr_humanize(position.gain) %>
56 <% if position.is_closed? and not position.is_viewed_before_closure? %>
57 <span><%= percentage_of(position.purchase_volume, position.gain) %></span>
59 <span><%= percentage_change(position.invested, position.dirty_value) %></span>