noalyss Version-9
|
For the periode tables parm_periode and jrn_periode. More...
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. More... | |
count_operation () | |
count the number of operation of a Periode More... | |
delete () | |
find_periode ($p_date) | |
retrieve the periode thanks the date_end More... | |
first_day ($p=0) | |
return the first day of periode the this->p_id must be set More... | |
get_date_limit ($p_periode=0) | |
Give the start & end date of a periode. More... | |
get_exercice ($p_id=0) | |
get_first_date () | |
retrieve the first day of the first exercice More... | |
get_first_periode () | |
retrieve the first periode of the folder or -1 if none More... | |
get_limit ($p_exercice) | |
return the max and the min periode of the exercice given in parameter More... | |
insert ($p_date_start, $p_date_end, $p_exercice, $p_exercice_label) | |
Add new periode. More... | |
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 More... | |
is_centralized () | |
Return 1 if periode is centralized. More... | |
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 More... | |
is_open () | |
Return 1 if the periode is open otherwise 0. More... | |
last_day ($p=0) | |
return the last day of periode the this->p_id must be set More... | |
limit_year ($p_exercice) | |
return the p_id of the start and the end of the exercice into an array More... | |
load () | |
load data from database More... | |
reopen () | |
set_ledger ($p_jrn) | |
set_periode ($pp_id) | |
verify_delete () | |
Verify before delete that the month is not used. More... | |
Static Public Member Functions | |
static | display_periode_global ($p_js) |
Display a table with all the periode. More... | |
static | display_row_global (Parm_Periode_SQL $obj, $p_nb, $p_js) |
Display each row for the global. More... | |
static | filter_exercice ($p_sel) |
static | form_exercice_add () |
display a form (method POST) to input a new exercice variable in the FORM More... | |
static | form_exercice_label () |
form to change the label of exercice More... | |
static | form_periode_add ($p_js_var) |
Display a form for the input of a new periode. More... | |
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_id, $p_start, $r, and $status.
Periode::centralized | ( | ) |
Definition at line 221 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 187 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 566 of file periode.class.php.
Periode::delete | ( | ) |
|
static |
Display a table with all the periode.
$p_js | javascript variable |
Definition at line 530 of file periode.class.php.
References $cn, $i, $obj, $periode, $ret, Dossier\connect(), display_row_global(), DatabaseCore\num_row(), and th().
|
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 583 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().
|
static |
Definition at line 755 of file periode.class.php.
References $cn, and Dossier\connect().
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 413 of file periode.class.php.
References $p_date, $per, $ret, $sql, cn, DatabaseCore\fetch_result(), DatabaseCore\num_row(), and p_id.
Periode::first_day | ( | $p = 0 | ) |
return the first day of periode the this->p_id must be set
Definition at line 375 of file periode.class.php.
References $p, $p_end, $p_id, $p_start, and get_date_limit().
|
static |
display a form (method POST) to input a new exercice variable in the FORM
Definition at line 663 of file periode.class.php.
References $cn, $exercice, $exercice_label, $from, $i, $year, and Dossier\connect().
|
static |
form to change the label of exercice
Definition at line 697 of file periode.class.php.
References $cn, and Dossier\connect().
|
static |
Display a form for the input of a new periode.
Definition at line 721 of file periode.class.php.
References $cn, $html, $http, $p_end, $p_exercice, $p_start, $title, HtmlInput\button(), Dossier\connect(), HtmlInput\hidden(), Dossier\hidden(), HtmlInput\submit(), td(), HtmlInput\title_box(), and tr().
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 356 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().
Periode::get_exercice | ( | $p_id = 0 | ) |
Definition at line 396 of file periode.class.php.
References $p_id, $Res, $sql, cn, DatabaseCore\fetch_result(), and DatabaseCore\num_row().
Periode::get_first_date | ( | ) |
retrieve the first day of the first exercice
Definition at line 769 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 779 of file periode.class.php.
References cn.
Periode::get_limit | ( | $p_exercice | ) |
return the max and the min periode of the exercice given in parameter
$p_exercice | is the exercice |
Definition at line 327 of file periode.class.php.
References $max, $min, $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 244 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().
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 439 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().
Periode::is_centralized | ( | ) |
Return 1 if periode is centralized.
Definition at line 144 of file periode.class.php.
References $res, $sql, $status, cn, DatabaseCore\fetch_result(), and jrn_def_id.
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 $res, $sql, $status, cn, DatabaseCore\fetch_result(), and jrn_def_id.
Periode::is_open | ( | ) |
Return 1 if the periode is open otherwise 0.
Definition at line 120 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 388 of file periode.class.php.
References $p, $p_end, $p_id, $p_start, and get_date_limit().
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 303 of file periode.class.php.
Periode::reopen | ( | ) |
Definition at line 161 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 709 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(), first_day(), get_date_limit(), get_exercice(), insert(), and last_day().
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().