<h1>Account Balance </h1>
<%= number_to_currency(@user.portfolio_value, :unit => "Y$") %>
<p></p>

<h1>My Wagers</h1>
<% if holding_list.size > 0 %>
  <ul>
    <% for holding in holding_list %>
      <li>
        <div>
        <%= number_to_currency(holding.cost.abs, :unit => "Y$") %> on <%= link_to_remote holding.market.team.name, :url => {:controller => "market", :action => "info", :team => holding.market.team},
             :update => "market_list"  %> <%= bet_statement(holding) %>. <br>
        Pays <%= number_to_currency(holding.shares.abs, :unit => "Y$") %> - <%= link_to_remote "Cash out", :url => {:action => "holding_info", :cash_out => holding}, :update => "market_list" %> now for <%= number_to_currency(holding.market.value(holding.shares), :unit => "Y$") %>.
        <% if holding.id == cash_out.to_i %>
          <% form_remote_tag :url => { :controller => "market", :action => "cash_out", :holding_id => holding }, :update => "market_list" do %>
             Amount: Y$<%= text_field "trade", "wager", :size => 10 %>
             <%= submit_tag "Cash Out"%>
          <% end %>
        <% end %>
        </div>
        <p></p>
      </li>
    <% end %>
  </ul>
<% else %>
You have not made any wagers.
<% end %>
