noalyss Version-9
Public Member Functions | Data Fields
Exercice Class Reference

about the accountancy period (usually 1 year starting in January until december) = exercice More...

+ Collaboration diagram for Exercice:

Public Member Functions

 __construct ($cn)
 
 count ()
 return the number of different exercices into a folder More...
 
 exercice_from_label ($p_label)
 retrieve the exercice from the exercice label More...
 
 select ($name, $selected='', $js='')
 Show a ISelect with the different exercices. More...
 
 select_date ($name, $selected='', $js='')
 Show a ISelect with the different exercices, display start and end date. More...
 

Data Fields

 $cn
 

Detailed Description

about the accountancy period (usually 1 year starting in January until december) = exercice

Definition at line 30 of file exercice.class.php.

Constructor & Destructor Documentation

◆ __construct()

Exercice::__construct (   $cn)

Definition at line 33 of file exercice.class.php.

34 {
35 $this->cn=$cn;
36 }
$input_from cn
Definition: balance.inc.php:66

References $cn, and cn.

Member Function Documentation

◆ count()

Exercice::count ( )

return the number of different exercices into a folder

Parameters
$cnis the database connexion object database
Returns
the count of exercice

Definition at line 42 of file exercice.class.php.

43 {
44 $count=$this->cn->get_value('select count(distinct p_exercice) from parm_periode');
45 return $count;
46 }
$count

References $count, and cn.

◆ exercice_from_label()

Exercice::exercice_from_label (   $p_label)

retrieve the exercice from the exercice label

Parameters
string$p_label

Definition at line 85 of file exercice.class.php.

86 {
87 $value = $this->cn->get_value("select distinct p_exercice from parm_periode where p_exercice_label=$1",
88 [$p_label]);
89 if ($value == "") return -1;
90 return $value;
91 }

References $value, and cn.

◆ select()

Exercice::select (   $name,
  $selected = '',
  $js = '' 
)

Show a ISelect with the different exercices.

Parameters
$nameof the iselect
$selectedthe selected year (default = '')
$jsjavascript (default = '')
Returns
ISelect object

Definition at line 54 of file exercice.class.php.

55 {
57 $iselect->value=$this->cn->make_array('select distinct p_exercice,p_exercice_label from parm_periode order by 1 desc');
58 $iselect->selected=$selected;
59 $iselect->javascript=$js;
60 return $iselect;
61 }
$selected
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
$iselect
Definition: menu.inc.php:121

References $iselect, $js, $name, $selected, and cn.

◆ select_date()

Exercice::select_date (   $name,
  $selected = '',
  $js = '' 
)

Show a ISelect with the different exercices, display start and end date.

Parameters
$nameof the iselect
$selectedthe selected year (default = '')
$jsjavascript (default = '')
Returns
ISelect object

Definition at line 69 of file exercice.class.php.

70 {
72 $iselect->value=$this->cn->make_array("select distinct p_exercice,to_char (min(p_start),'DD.MM.YY')
73 ||' - '
74 ||to_char (max(p_end),'DD.MM.YY')
75 from parm_periode
76 group by p_exercice order by 1");
77 $iselect->selected=$selected;
78 $iselect->javascript=$js;
79 return $iselect;
80 }

References $iselect, $js, $name, $selected, and cn.

Field Documentation

◆ $cn

Exercice::$cn

Definition at line 32 of file exercice.class.php.

Referenced by __construct().


The documentation for this class was generated from the following file: