Skip to content
Snippets Groups Projects
Commit cfaf1f08 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Can add tabs on statistics views.

parent ca727ca1
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,7 @@ For developers:
- New: Removed artichow deprecated libraries.
- New: A page can force reload of css style sheet
- New: A module can add import description for import wizard, even for tables with foreign keys.
- New: Can add tabs on statistics views.
- Qual: Add a lot of more PHPUnit tests.
- Qual: Data structure for supplier prices is simpler.
- Qual: Removed no more used external libraries.
......
......@@ -216,6 +216,8 @@ $head[$h][1] = $langs->trans("ByMonthYear");
$head[$h][2] = 'byyear';
$h++;
complete_head_from_modules($conf,$langs,$object,$head,$h,'propal_stats');
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
......
......@@ -225,13 +225,19 @@ foreach($data as $val) {
}
if (! count($arrayyears)) $arrayyears[$nowyear]=$nowyear;
$h=0;
$head = array();
$head[$h][0] = DOL_URL_ROOT . '/commande/stats/index.php';
$head[$h][0] = DOL_URL_ROOT . '/commande/stats/index.php?mode='.$mode;
$head[$h][1] = $langs->trans("ByMonthYear");
$head[$h][2] = 'byyear';
$h++;
if ($mode == 'customer') $type='order_stats';
if ($mode == 'supplier') $type='supplier_order_stats';
complete_head_from_modules($conf,$langs,$object,$head,$h,$type);
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<table class="notopnoleftnopadd" width="100%"><tr>';
......
......@@ -196,11 +196,13 @@ if (! count($arrayyears)) $arrayyears[$nowyear]=$nowyear;
$h=0;
$head = array();
$head[$h][0] = DOL_URL_ROOT . '/commande/stats/index.php';
$head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/stats/index.php';
$head[$h][1] = $langs->trans("ByMonthYear");
$head[$h][2] = 'byyear';
$h++;
complete_head_from_modules($conf,$langs,$object,$head,$h,'trip_stats');
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<table class="notopnoleftnopadd" width="100%"><tr>';
......
......@@ -207,11 +207,16 @@ if (! count($arrayyears)) $arrayyears[$nowyear]=$nowyear;
$h=0;
$head = array();
$head[$h][0] = DOL_URL_ROOT . '/commande/stats/index.php';
$head[$h][0] = DOL_URL_ROOT . '/compta/facture/stats/index.php?mode='.$mode;
$head[$h][1] = $langs->trans("ByMonthYear");
$head[$h][2] = 'byyear';
$h++;
if ($mode == 'customer') $type='invoice_stats';
if ($mode == 'supplier') $type='supplier_invoice_stats';
complete_head_from_modules($conf,$langs,$object,$head,$h,$type);
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<table class="notopnoleftnopadd" width="100%"><tr>';
......
......@@ -26,7 +26,7 @@ require('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/report.lib.php");
$year_start=isset($_GET["year_start"])?$_GET["year_start"]:$_POST["year_start"];
$year_start=GETPOST("year_start");
$year_current = strftime("%Y",time());
$nbofyear=4;
if (! $year_start) {
......
......@@ -37,15 +37,17 @@ llxHeader();
print_fiche_titre($langs->trans("StatisticsOfSendings"), $mesg);
// TODO USe code similar to commande/stats/index.php instead of this one.
print '<table class="border" width="100%">';
print '<tr><td align="center">'.$langs->trans("Year").'</td>';
print '<td width="40%" align="center">'.$langs->trans("NbOfSendings").'</td></tr>';
$sql = "SELECT count(*), date_format(date_expedition,'%Y') as dm";
$sql = "SELECT count(*) as nb, date_format(date_expedition,'%Y') as dm";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition";
$sql.= " WHERE fk_statut > 0";
$sql.= " AND entity = ".$conf->entity;
$sql.= " GROUP BY dm DESC ";
$sql.= " GROUP BY dm DESC";
$resql=$db->query($sql);
if ($resql)
......@@ -62,7 +64,7 @@ if ($resql)
$i++;
}
}
$db->free();
$db->free($resql);
print '</table>';
print '<br>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment