.iro-purses-show.padded .max-width .header %h4.title Purse ##{@purse.id}. #{link_to '[~]', edit_iro_purse_path(@purse)} Value: $#{@purse.current_value} %h5.collapse-expand#iroPurseConfig Config -# #{link_to '[~]', edit_iro_purse_path(@purse)} .config -# %pre= @purse.config = render 'form', iro_purse: @purse %h5.collapse-expand#strategies Strategies (#{@strategies.length}) = link_to '[+]', new_iro_strategy_path({ iro_purse_id: @purse.id }) .strategies.items - @strategies.each do |strat| .strategy.item= render 'ish_manager/iro_strategies/form', strategy: strat %h5.collapse-expand#positions Positions (#{@positions.length}) = link_to '[+]', new_iro_position_path({ iro_purse_id: @purse.id }) .positions %table.bordered %thead %tr %td .id id %td .strategy Strategy %td .ticker Ticker %td .type Kind/Type %td .strike Strike %td .expires_on ExpiresOn %td .days-left Days Left %td .q Q %td .begin-on Begin On %td .price Price %td .to-open To Open %td .begin-delta #{"\u0394"} %td .to-close Current $
(To Close) %td .net Net %td .netp % Net %td .delta #{"\u0394"} %td .days-at-open Days@Open %td .must-roll Must roll? %td .should-roll Should roll? %td .next-symbol Next Symbol %td .next-delta Next Delta %td .next-outcome Next Outcome %td .state State %tbody - @positions.each do |p| %tr %td.id = p.id = link_to '[~]', edit_iro_position_path(p) %td.strategy= link_to p.strategy, edit_iro_strategy_path(p.strategy) %td= p.ticker %td= p.type == "Iro::CoveredCall" ? "CALL" : "other" %td= p.strike %td= p.expires_on.strftime('%b %d') %td.days-left= (p.expires_on.to_date - Time.now.to_date).to_i %td.q= p.quantity %td.begin-on= pp_date p.opened_on %td.price= p.opened_price %td.to-open= pp_amount( p.opened_price * 100 * p.quantity ) %td.begin-delta= sprintf('%.2f', p.opened_delta ) rescue nil %td= pp_money p.current_price %td.net= pp_money ( p.opened_price - p.current_price ) * 100 - 1.3 %td.netp= pp_percent ( p.opened_price - p.current_price ) / p.opened_price %td= sprintf('%.2f', p.current_delta ) rescue nil %td= (p.expires_on.to_date - p.opened_on).to_i %td.must-roll= pp_bool p.must_roll? %td.should-roll .aC .a= p.should_rollp ? p.should_rollp : '-' .a= pp_bool p.should_roll? %td.next-symbol= p.next_symbol %td.next-delta= p.next_position[:delta] %td.next-outcome= pp_money p.next_outcome %td.state= p.status