|
noalyss
Version-6.7.2
|
this class is called normally from forecast, a forecast contains category like sales, expenses, each category contains items More...
Public Member Functions | |
| __construct ($p_init, $p_id=0) | |
| constructor | |
| delete () | |
| get_info () | |
| get_parameter ($p_string) | |
| insert () | |
| load () | |
| make_array ($id) | |
| Make a array for a ISelect of the available cat. | |
| save () | |
| set_parameter ($p_string, $p_value) | |
| update () | |
| verify () | |
Static Public Member Functions | |
| static | load_all ($p_cn, $p_id) |
| Load all the cat. | |
| static | test_me () |
| unit test | |
Private Attributes | |
| $cn | |
Static Private Attributes | |
| static | $variable = array ("id"=>"fc_id","order"=>"fc_order","desc"=>"fc_desc","forecast"=>"f_id") |
this class is called normally from forecast, a forecast contains category like sales, expenses, each category contains items
Definition at line 33 of file class_forecast_cat.php.
| Forecast_Cat::__construct | ( | $ | p_init, |
| $ | p_id = 0 |
||
| ) |
constructor
| $p_init | Database object |
Definition at line 42 of file class_forecast_cat.php.
References cn.
{
$this->cn=$p_init;
$this->fc_id=$p_id;
}
Definition at line 69 of file class_forecast_cat.php.
{
return var_export(self::$variable,true);
}
| Forecast_Cat::get_parameter | ( | $ | p_string | ) |
Definition at line 91 of file class_forecast_cat.php.
References $res, $sql, cn, Database\fetch_result(), and verify().
Referenced by save().
Definition at line 129 of file class_forecast_cat.php.
References $idx, $res, $row, $sql, $value, cn, Database\fetch_array(), and Database\num_row().
| static Forecast_Cat::load_all | ( | $ | p_cn, |
| $ | p_id | ||
| ) | [static] |
Load all the cat.
for a given forecast and return them into a array
| $p_cn | database connx |
| $p_id | is the forecast id (f_id) |
Definition at line 121 of file class_forecast_cat.php.
Referenced by Anticipation\form_cat_mod().
| Forecast_Cat::make_array | ( | $ | id | ) |
Make a array for a ISelect of the available cat.
| $id | is forecast::f_id |
Definition at line 153 of file class_forecast_cat.php.
Definition at line 83 of file class_forecast_cat.php.
References get_parameter(), insert(), and update().
{
if ( $this->get_parameter("id") == 0 )
$this->insert();
else
$this->update();
}
| Forecast_Cat::set_parameter | ( | $ | p_string, |
| $ | p_value | ||
| ) |
| static Forecast_Cat::test_me | ( | ) | [static] |
Forecast_Cat::$cn [private] |
Definition at line 37 of file class_forecast_cat.php.
Forecast_Cat::$variable = array ("id"=>"fc_id","order"=>"fc_order","desc"=>"fc_desc","forecast"=>"f_id") [static, private] |
Definition at line 36 of file class_forecast_cat.php.