dao_positiondata access object for table position
Located in /lib/dao_position.class.php (line 34)
vo | --vo_position | --dao_position
float
$avg_purchase
= 0.0 (line 70)
average purchase quote
float
$charges
= 0.0 (line 78)
charges recorded on orders of this position
int
$date
= 0 (line 41)
date form the last (?) PositionRevision
float
$dividend
= 0.0 (line 85)
dividend received in this position
float
$invested
= 0.0 (line 63)
invested amount of money, BETTER use get_investment()
string
$name
= '' (line 48)
name of the security held in the position (stock.name)
int
$shares
= 0 (line 55)
number of shares in the position
float
$stoploss_hard
= 0.0 (line 97)
stoploss hard limit
bool
$stoploss_present
= false (line 112)
stoploss present?
float
$stoploss_soft
= 0.0 (line 91)
stoploss soft limit
string
$stoploss_status
= 'no order present' (line 105)
stoploss status
int
$_id_quote
= 0 (line 124)
database id of $_quote
float
$_quote
= 0.0 (line 118)
current quote for $name
int
$_quotetime
= 0 (line 130)
unix-timestamp of current @_quote
Inherited from vo_position
vo_position::$closed
vo_position::$comment
vo_position::$id
vo_position::$id_portfolio
vo_position::$id_stock
get_css_class (line 225)
return a CSS classname to display this position, depends in the investment state (empty, short, ...) and/or whether the position is currently selected or not (see $id_position)
NOTE: this is here because templates get too complicated otherwise
get_investment (line 199)
returns invested money automatically respects the open/close status since a gain is recorded negativ and a loss is recorded positive in the database! Optionally the investment can be adjusted by dividend and/or charges.
get_market_value (line 183)
returns current market value (shares * quote)
get_quote (line 162)
return current quote for $name or id_quote if
$return_id_quote is set
get_quotetime (line 174)
return time of current quote
get_weight (line 248)
returns the "weight" of this position in relation to the total market
value of the portfolio, in percent
is_closed (line 280)
tell whether this position has been closed
is_empty (line 258)
tell whether this position is empty
is_short (line 269)
tell whether this position is a short position
set_quote (line 139)
set $quote
set_quote2 (line 150)
set $quote
Inherited From vo_position
vo_position::get_primary_key()
vo_position::store()
Inherited From vo
vo::__construct()
Documentation generated on Sun, 22 Aug 2010 11:20:15 +0200 by phpDocumentor 1.4.3