Parent class of statistics class.
More...
|
| getNbByMonthWithPrevYear ($endyear, $startyear, $cachedelay=0, $format=0, $startmonth=1) |
| Return nb of elements by month for several years. More...
|
|
| getAmountByMonthWithPrevYear ($endyear, $startyear, $cachedelay=0, $format=0, $startmonth=1) |
| Return amount of elements by month for several years. More...
|
|
| getAverageByMonthWithPrevYear ($endyear, $startyear) |
| Return average of entity by month for several years. More...
|
|
| getAllByProductEntry ($year, $cachedelay=0, $limit=10) |
| Return count, and sum of products. More...
|
|
|
| getNbByMonth ($year, $format=0) |
|
| getAmountByMonth ($year, $format=0) |
|
| getAverageByMonth ($year) |
|
| _getNbByYear ($sql) |
| Return nb of elements by year. More...
|
|
| _getAllByYear ($sql) |
| Return nb of elements, total amount and avg amount each year. More...
|
|
| _getNbByMonth ($year, $sql, $format=0) |
| Renvoie le nombre de documents par mois pour une annee donnee Return number of documents per month for a given year. More...
|
|
| _getAmountByMonth ($year, $sql, $format=0) |
| Return the amount per month for a given year. More...
|
|
| _getAverageByMonth ($year, $sql, $format=0) |
| Renvoie le montant moyen par mois pour une annee donnee Return the amount average par month for a given year. More...
|
|
| _getAllByProduct ($sql, $limit=10) |
| Return number or total of product refs. More...
|
|
| _getAmountByYear ($sql) |
| Returns the summed amounts per year for a given number of past years ending now. More...
|
|
Parent class of statistics class.
Definition at line 30 of file stats.class.php.
◆ _getAllByProduct()
Stats::_getAllByProduct |
( |
|
$sql, |
|
|
|
$limit = 10 |
|
) |
| |
|
protected |
Return number or total of product refs.
- Parameters
-
string | $sql | SQL |
int | $limit | Limit |
- Returns
- array
Definition at line 609 of file stats.class.php.
◆ _getAllByYear()
Stats::_getAllByYear |
( |
|
$sql | ) |
|
|
protected |
Return nb of elements, total amount and avg amount each year.
- Parameters
-
- Returns
- array Array with nb, total amount, average for each year
Definition at line 386 of file stats.class.php.
◆ _getAmountByMonth()
Stats::_getAmountByMonth |
( |
|
$year, |
|
|
|
$sql, |
|
|
|
$format = 0 |
|
) |
| |
|
protected |
Return the amount per month for a given year.
- Parameters
-
int | $year | Year |
string | $sql | SQL |
int | $format | 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month |
- Returns
- array
Definition at line 494 of file stats.class.php.
◆ _getAmountByYear()
Stats::_getAmountByYear |
( |
|
$sql | ) |
|
|
protected |
Returns the summed amounts per year for a given number of past years ending now.
- Parameters
-
- Returns
- array
Definition at line 648 of file stats.class.php.
◆ _getAverageByMonth()
Stats::_getAverageByMonth |
( |
|
$year, |
|
|
|
$sql, |
|
|
|
$format = 0 |
|
) |
| |
|
protected |
Renvoie le montant moyen par mois pour une annee donnee Return the amount average par month for a given year.
- Parameters
-
int | $year | Year |
string | $sql | SQL |
int | $format | 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month |
- Returns
- array
Definition at line 552 of file stats.class.php.
◆ _getNbByMonth()
Stats::_getNbByMonth |
( |
|
$year, |
|
|
|
$sql, |
|
|
|
$format = 0 |
|
) |
| |
|
protected |
Renvoie le nombre de documents par mois pour une annee donnee Return number of documents per month for a given year.
- Parameters
-
int | $year | Year |
string | $sql | SQL |
int | $format | 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month |
- Returns
- array Array of nb each month
Definition at line 437 of file stats.class.php.
◆ _getNbByYear()
Stats::_getNbByYear |
( |
|
$sql | ) |
|
|
protected |
Return nb of elements by year.
- Parameters
-
- Returns
- array
Definition at line 357 of file stats.class.php.
◆ getAllByProductEntry()
Stats::getAllByProductEntry |
( |
|
$year, |
|
|
|
$cachedelay = 0 , |
|
|
|
$limit = 10 |
|
) |
| |
Return count, and sum of products.
- Parameters
-
int | $year | Year |
int | $cachedelay | Delay we accept for cache file (0=No read, no save of cache, -1=No read but save) |
int | $limit | Limit |
- Returns
- array Array of values
Definition at line 287 of file stats.class.php.
◆ getAmountByMonth()
Stats::getAmountByMonth |
( |
|
$year, |
|
|
|
$format = 0 |
|
) |
| |
|
abstractprotected |
- Parameters
-
int | $year | year number |
int | $format | 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month |
- Returns
- int value
Reimplemented in TicketStats, SalariesStats, ReceptionStats, TaskStats, ProjectStats, FichinterStats, ExpenseReportStats, ExpeditionStats, DonationStats, FactureStats, DeplacementStats, CommandeStats, PropaleStats, and AdherentStats.
◆ getAmountByMonthWithPrevYear()
Stats::getAmountByMonthWithPrevYear |
( |
|
$endyear, |
|
|
|
$startyear, |
|
|
|
$cachedelay = 0 , |
|
|
|
$format = 0 , |
|
|
|
$startmonth = 1 |
|
) |
| |
Return amount of elements by month for several years.
Criterias used to build request are defined into the constructor of parent class into xxx/class/xxxstats.class.php The caller of class can add more filters into sql request by adding criteris into the $stats->where property just after calling constructor.
- Parameters
-
int | $endyear | Start year |
int | $startyear | End year |
int | $cachedelay | Delay we accept for cache file (0=No read, no save of cache, -1=No read but save) |
int | $format | 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month |
int | $startmonth | month of the fiscal year start min 1 max 12 ; if 1 = january |
- Returns
- array Array of values
Definition at line 154 of file stats.class.php.
◆ getAverageByMonth()
Stats::getAverageByMonth |
( |
|
$year | ) |
|
|
abstractprotected |
- Parameters
-
- Returns
- int value
Reimplemented in TicketStats, SalariesStats, ReceptionStats, TaskStats, ProjectStats, FichinterStats, ExpenseReportStats, ExpeditionStats, DonationStats, FactureStats, DeplacementStats, CommandeStats, PropaleStats, and AdherentStats.
◆ getAverageByMonthWithPrevYear()
Stats::getAverageByMonthWithPrevYear |
( |
|
$endyear, |
|
|
|
$startyear |
|
) |
| |
Return average of entity by month for several years.
- Parameters
-
int | $endyear | Start year |
int | $startyear | End year |
- Returns
- array Array of values
Definition at line 251 of file stats.class.php.
◆ getNbByMonth()
Stats::getNbByMonth |
( |
|
$year, |
|
|
|
$format = 0 |
|
) |
| |
|
abstractprotected |
- Parameters
-
int | $year | number |
int | $format | 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month |
- Returns
- int value
Reimplemented in TicketStats, SalariesStats, ReceptionStats, TaskStats, ProjectStats, FichinterStats, ExpenseReportStats, ExpeditionStats, DonationStats, FactureStats, DeplacementStats, CommandeStats, PropaleStats, and AdherentStats.
◆ getNbByMonthWithPrevYear()
Stats::getNbByMonthWithPrevYear |
( |
|
$endyear, |
|
|
|
$startyear, |
|
|
|
$cachedelay = 0 , |
|
|
|
$format = 0 , |
|
|
|
$startmonth = 1 |
|
) |
| |
Return nb of elements by month for several years.
- Parameters
-
int | $endyear | Start year |
int | $startyear | End year |
int | $cachedelay | Delay we accept for cache file (0=No read, no save of cache, -1=No read but save) |
int | $format | 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month |
int | $startmonth | month of the fiscal year start min 1 max 12 ; if 1 = january |
- Returns
- array Array of values
Definition at line 53 of file stats.class.php.
The documentation for this class was generated from the following file: