|
dolibarr
13.0.2
|
Parent class of statistics class. More...
Inheritance diagram for Stats:Public Member Functions | |
| 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... | |
Protected Member Functions | |
| _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... | |
Parent class of statistics class.
Definition at line 30 of file stats.class.php.
|
protected |
Return number or total of product refs.
| string | $sql | SQL |
| int | $limit | Limit |
Definition at line 581 of file stats.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
Referenced by FichinterStats\getAllByProduct(), CommandeStats\getAllByProduct(), FactureStats\getAllByProduct(), and PropaleStats\getAllByProduct().
|
protected |
Return nb of elements, total amount and avg amount each year.
| string | $sql | SQL request |
Definition at line 368 of file stats.class.php.
References $resql, db, dol_print_error(), dol_syslog(), and if.
Referenced by TaskStats\getAllByYear(), ProjectStats\getAllByYear(), ReceptionStats\getAllByYear(), ExpeditionStats\getAllByYear(), DonationStats\getAllByYear(), TicketStats\getAllByYear(), SalariesStats\getAllByYear(), DeplacementStats\getAllByYear(), AdherentStats\getAllByYear(), ExpenseReportStats\getAllByYear(), FichinterStats\getAllByYear(), CommandeStats\getAllByYear(), FactureStats\getAllByYear(), and PropaleStats\getAllByYear().
|
protected |
Return the amount per month for a given year.
| 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 |
Definition at line 471 of file stats.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
Referenced by TicketStats\getAmountByMonth(), SalariesStats\getAmountByMonth(), DeplacementStats\getAmountByMonth(), AdherentStats\getAmountByMonth(), ExpenseReportStats\getAmountByMonth(), FichinterStats\getAmountByMonth(), CommandeStats\getAmountByMonth(), FactureStats\getAmountByMonth(), PropaleStats\getAmountByMonth(), ProjectStats\getAmountByMonth(), and ProjectStats\getWeightedAmountByMonth().
|
protected |
Renvoie le montant moyen par mois pour une annee donnee Return the amount average par month for a given year.
| 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 |
Definition at line 527 of file stats.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
Referenced by TicketStats\getAverageByMonth(), SalariesStats\getAverageByMonth(), DeplacementStats\getAverageByMonth(), AdherentStats\getAverageByMonth(), ExpenseReportStats\getAverageByMonth(), FichinterStats\getAverageByMonth(), CommandeStats\getAverageByMonth(), FactureStats\getAverageByMonth(), and PropaleStats\getAverageByMonth().
|
protected |
Renvoie le nombre de documents par mois pour une annee donnee Return number of documents per month for a given year.
| 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 |
Definition at line 414 of file stats.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
Referenced by ReceptionStats\getNbByMonth(), AdherentStats\getNbByMonth(), ExpeditionStats\getNbByMonth(), FichinterStats\getNbByMonth(), SalariesStats\getNbByMonth(), TicketStats\getNbByMonth(), DonationStats\getNbByMonth(), DeplacementStats\getNbByMonth(), ExpenseReportStats\getNbByMonth(), CommandeStats\getNbByMonth(), FactureStats\getNbByMonth(), PropaleStats\getNbByMonth(), TaskStats\getNbByMonth(), ProjectStats\getNbByMonth(), and ProjectStats\getTransformRateByMonth().
|
protected |
Return nb of elements by year.
| string | $sql | SQL request |
Definition at line 337 of file stats.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
Referenced by SalariesStats\getNbByYear(), DeplacementStats\getNbByYear(), TicketStats\getNbByYear(), ExpenseReportStats\getNbByYear(), AdherentStats\getNbByYear(), ReceptionStats\getNbByYear(), ExpeditionStats\getNbByYear(), FichinterStats\getNbByYear(), DonationStats\getNbByYear(), CommandeStats\getNbByYear(), FactureStats\getNbByYear(), and PropaleStats\getNbByYear().
| Stats::getAllByProductEntry | ( | $year, | |
$cachedelay = 0, |
|||
$limit = 10 |
|||
| ) |
Return count, and sum of products.
| 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 |
Definition at line 265 of file stats.class.php.
References dol_filemtime(), dol_is_dir(), dol_mkdir(), dol_now(), and dol_syslog().
| 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.
| 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 |
Definition at line 139 of file stats.class.php.
References dol_filemtime(), dol_is_dir(), dol_mkdir(), dol_now(), and dol_syslog().
| Stats::getAverageByMonthWithPrevYear | ( | $endyear, | |
| $startyear | |||
| ) |
Return average of entity by month for several years.
| int | $endyear | Start year |
| int | $startyear | End year |
Definition at line 228 of file stats.class.php.
| Stats::getNbByMonthWithPrevYear | ( | $endyear, | |
| $startyear, | |||
$cachedelay = 0, |
|||
$format = 0, |
|||
$startmonth = 1 |
|||
| ) |
Return nb of elements by month for several years.
| 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 |
Definition at line 46 of file stats.class.php.
References dol_filemtime(), dol_is_dir(), dol_mkdir(), dol_now(), and dol_syslog().