|
noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
|
For the periode tables parm_periode and jrn_periode. More...
Collaboration diagram for Periode:Public Member Functions | |
| __construct ($p_cn, $p_id=0) | |
| __toString () | |
| centralized () | |
| close () | |
| Close a periode , if Periode::jrn_def_id is set to a different value than 0 , it close only for this ledger id ; otherwise close for all periode. | |
| count_operation () | |
| count the number of operation of a Periode | |
| delete () | |
| find_periode ($p_date) | |
| retrieve the periode thanks the date_end | |
| first_day ($p=0) | |
| return the first day of periode the this->p_id must be set | |
| get_date_limit ($p_periode=0) | |
| Give the start & end date of a periode. | |
| get_exercice ($p_id=0) | |
| get_first_date () | |
| retrieve the first day of the first exercice | |
| get_first_periode () | |
| retrieve the first periode of the folder or -1 if none | |
| get_limit ($p_exercice) | |
| return the max (to periode) and the min periode (from periode) of the exercice given in parameter | |
| insert ($p_date_start, $p_date_end, $p_exercice, $p_exercice_label) | |
| Add new periode. | |
| insert_exercice ($p_exercice, $p_year, $p_from_month, $p_month, $p_opening, $p_closing, $p_exercice_label) | |
| add a exercice starting in year p_year with p_month month, with a starting and a closing | |
| is_centralized () | |
| Return 1 if periode is centralized. | |
| is_closed () | |
| check if a periode is closed. If jrn_def_id is set to a no zero value then check only for this ledger | |
| is_open () | |
| Return 1 if the periode is open otherwise 0. | |
| last_day ($p=0) | |
| return the last day of periode the this->p_id must be set | |
| limit_year ($p_exercice) | |
| return the p_id of the start and the end of the exercice into an array | |
| load () | |
| load data from database | |
| reopen () | |
| set_ledger ($p_jrn) | |
| set_periode ($pp_id) | |
| verify_delete () | |
| Verify before delete that the month is not used. | |
Static Public Member Functions | |
| static | display_periode_global ($p_js) |
| Display a table with all the periode. | |
| static | display_row_global (Parm_Periode_SQL $obj, $p_nb, $p_js) |
| Display each row for the global. | |
| static | filter_exercice ($p_sel) |
| static | form_exercice_add () |
| display a form (method POST) to input a new exercice variable in the FORM | |
| static | form_exercice_label () |
| form to change the label of exercice | |
| static | form_periode_add ($p_js_var) |
| Display a form for the input of a new periode. | |
Data Fields | |
| $cn | |
| $jrn_def_id | |
| $p_central | |
| $p_closed | |
| $p_end | |
| $p_exercice | |
| $p_exercice_label | |
| $p_id | |
| $p_start | |
| $status | |
For the periode tables parm_periode and jrn_periode.
Definition at line 32 of file periode.class.php.
| Periode::__construct | ( | $p_cn, | |
| $p_id = 0 ) |
Definition at line 46 of file periode.class.php.
References $p_id, cn, jrn_def_id, and p_id.
| Periode::__toString | ( | ) |
Definition at line 53 of file periode.class.php.
References $jrn_def_id, $p_end, $p_end, $p_id, $p_id, $p_start, $p_start, $r, $status, and $status.
| Periode::centralized | ( | ) |
Definition at line 227 of file periode.class.php.
References cn, jrn_def_id, and p_id.
| Periode::close | ( | ) |
Close a periode , if Periode::jrn_def_id is set to a different value than 0 , it close only for this ledger id ; otherwise close for all periode.
Definition at line 193 of file periode.class.php.
References cn, jrn_def_id, and p_id.
| Periode::count_operation | ( | ) |
count the number of operation of a Periode
Definition at line 573 of file periode.class.php.
| Periode::delete | ( | ) |
|
static |
Display a table with all the periode.
| $p_js | javascript variable |
Definition at line 537 of file periode.class.php.
References $cn, $i, $obj, $periode, $ret, _, display_row_global(), DatabaseCore\num_row(), and th().
Here is the call graph for this function:
|
static |
Display each row for the global.
| $obj | Parm_Periode_SQL |
| $p_nb | not used so far |
| $p_js | javascript variable |
Display a checkbox to select several month to close
Can close if open
Definition at line 590 of file periode.class.php.
References $checkbox, $class, $js, $nb_operation, $obj, $periode, $status, _, format_date(), Icon_Action\iconoff(), Icon_Action\iconon(), Icon_Action\modify(), td(), and Icon_Action\trash().
Referenced by display_periode_global().
Here is the call graph for this function:
|
static |
Definition at line 762 of file periode.class.php.
References $cn.
| Periode::find_periode | ( | $p_date | ) |
retrieve the periode thanks the date_end
| $p_date | format DD.MM.YYYY |
| if | not periode is found or if more than one periode is found |
Definition at line 420 of file periode.class.php.
References $p_date, $per, $ret, $sql, _, cn, DatabaseCore\fetch_result(), DatabaseCore\num_row(), and p_id.
Here is the call graph for this function:| Periode::first_day | ( | $p = 0 | ) |
return the first day of periode the this->p_id must be set
Definition at line 382 of file periode.class.php.
References $p, $p_end, $p_id, $p_start, and get_date_limit().
Here is the call graph for this function:
|
static |
display a form (method POST) to input a new exercice variable in the FORM
Definition at line 670 of file periode.class.php.
References $cn, $exercice, $exercice_label, $from, $i, $year, and _.
|
static |
form to change the label of exercice
Definition at line 704 of file periode.class.php.
References $cn.
|
static |
Display a form for the input of a new periode.
Definition at line 728 of file periode.class.php.
References $cn, $html, $http, $p_end, $p_exercice, $p_start, $title, _, td(), and tr().
Here is the call graph for this function:| Periode::get_date_limit | ( | $p_periode = 0 | ) |
Give the start & end date of a periode.
| $p_periode | is the periode id, if omitted the value is the current object |
$ret['p_start']=>'01.01.2009' $ret['p_end']=>'31.01.2009'
Definition at line 363 of file periode.class.php.
References $p_id, $Res, $sql, cn, DatabaseCore\fetch_array(), and DatabaseCore\num_row().
Referenced by first_day(), and last_day().
Here is the call graph for this function:| Periode::get_exercice | ( | $p_id = 0 | ) |
Definition at line 403 of file periode.class.php.
References $p_id, $p_id, $Res, $sql, cn, DatabaseCore\fetch_result(), and DatabaseCore\num_row().
Here is the call graph for this function:| Periode::get_first_date | ( | ) |
retrieve the first day of the first exercice
Definition at line 776 of file periode.class.php.
References cn.
| Periode::get_first_periode | ( | ) |
retrieve the first periode of the folder or -1 if none
Definition at line 786 of file periode.class.php.
References cn.
| Periode::get_limit | ( | $p_exercice | ) |
return the max (to periode) and the min periode (from periode) of the exercice given in parameter
| $p_exercice | is the exercice (parm_periode.p_exercice) |
Definition at line 334 of file periode.class.php.
References $p_exercice, and cn.
| Periode::insert | ( | $p_date_start, | |
| $p_date_end, | |||
| $p_exercice, | |||
| $p_exercice_label ) |
Add new periode.
| date | $p_date_start | |
| date | $p_date_end | |
| int | $p_exercice |
| Exception | 10 Invalide date or exercice, 20 overlapping periode |
Definition at line 250 of file periode.class.php.
References $e, $p_exercice, $p_exercice_label, $p_id, $Res, $sql, _, cn, COMPTA_MAX_YEAR, COMPTA_MIN_YEAR, isDate(), isNumber(), noalyss_strlentrim(), and record_log().
Referenced by insert_exercice().
Here is the call graph for this function:| Periode::insert_exercice | ( | $p_exercice, | |
| $p_year, | |||
| $p_from_month, | |||
| $p_month, | |||
| $p_opening, | |||
| $p_closing, | |||
| $p_exercice_label ) |
add a exercice starting in year p_year with p_month month, with a starting and a closing
| $p_exercice | the exercice |
| $p_year | the starting year |
| $p_from_month | starting month |
| $p_month | number of month of the exercice |
| $p_opening | 1 if we create a one-day periode for opening writings |
| $p_closing | 1 if we create a one-day periode for closing writings |
| $p_exercice_label | label of the exercice |
Definition at line 446 of file periode.class.php.
References $date_end, $date_start, $e, $i, $p_exercice, $p_exercice_label, $year, _, cn, COMPTA_MAX_YEAR, COMPTA_MIN_YEAR, elseif, insert(), isNumber(), and record_log().
Here is the call graph for this function:| Periode::is_centralized | ( | ) |
Return 1 if periode is centralized.
Definition at line 150 of file periode.class.php.
References $res, $sql, $status, cn, DatabaseCore\fetch_result(), and jrn_def_id.
Here is the call graph for this function:| Periode::is_closed | ( | ) |
check if a periode is closed. If jrn_def_id is set to a no zero value then check only for this ledger
Definition at line 100 of file periode.class.php.
References $sql, $status, cn, jrn_def_id, and p_id.
| Periode::is_open | ( | ) |
Return 1 if the periode is open otherwise 0.
Definition at line 126 of file periode.class.php.
References $sql, $status, cn, jrn_def_id, and p_id.
| Periode::last_day | ( | $p = 0 | ) |
return the last day of periode the this->p_id must be set
Definition at line 395 of file periode.class.php.
References $p, $p_end, $p_id, $p_start, and get_date_limit().
Here is the call graph for this function:| Periode::limit_year | ( | $p_exercice | ) |
return the p_id of the start and the end of the exercice into an array
| $p_exercice |
Definition at line 85 of file periode.class.php.
References $end, $p_exercice, $start, and cn.
| Periode::load | ( | ) |
load data from database
Definition at line 309 of file periode.class.php.
| Periode::reopen | ( | ) |
Definition at line 167 of file periode.class.php.
References cn, jrn_def_id, and p_id.
| Periode::set_ledger | ( | $p_jrn | ) |
Definition at line 68 of file periode.class.php.
References $p_jrn, and jrn_def_id.
| Periode::set_periode | ( | $pp_id | ) |
| Periode::verify_delete | ( | ) |
Verify before delete that the month is not used.
| Exception | code 1 if periode used |
Definition at line 716 of file periode.class.php.
| Periode::$cn |
database connection
Definition at line 35 of file periode.class.php.
Referenced by display_periode_global(), filter_exercice(), form_exercice_add(), form_exercice_label(), and form_periode_add().
| Periode::$jrn_def_id |
the jr, 0 means all the ledger
Definition at line 36 of file periode.class.php.
Referenced by __toString().
| Periode::$p_central |
NOT USED
Definition at line 44 of file periode.class.php.
| Periode::$p_closed |
if exercice is closed
Definition at line 43 of file periode.class.php.
| Periode::$p_end |
end of the periode
Definition at line 41 of file periode.class.php.
Referenced by __toString(), first_day(), form_periode_add(), and last_day().
| Periode::$p_exercice |
exercice
Definition at line 42 of file periode.class.php.
Referenced by form_periode_add(), get_limit(), insert(), insert_exercice(), and limit_year().
| Periode::$p_exercice_label |
Label of the exercice
Definition at line 45 of file periode.class.php.
Referenced by insert(), and insert_exercice().
| Periode::$p_id |
pk of parm_periode
Definition at line 37 of file periode.class.php.
Referenced by __construct(), __toString(), get_exercice(), and insert().
| Periode::$p_start |
start of the periode
Definition at line 40 of file periode.class.php.
Referenced by __toString(), first_day(), form_periode_add(), and last_day().
| Periode::$status |
status is CL for closed, OP for open and CE for centralized
Definition at line 38 of file periode.class.php.
Referenced by __toString(), display_row_global(), is_centralized(), is_closed(), and is_open().