New: First add of js graph
This commit is contained in:
parent
79ec8ccb9f
commit
10ff957206
@ -100,26 +100,44 @@ else dol_print_error($db);
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
||||||
if ($conf->societe->enabled)
|
if ($conf->use_javascript_ajax && $conf->societe->enabled && $conf->fournisseur->enabled
|
||||||
|
&& empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
|
||||||
{
|
{
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
|
print '<tr><td align="center">';
|
||||||
|
$data=array(
|
||||||
|
array('label'=>$langs->trans("Prospects"),'values'=>array(round($third['prospect']))),
|
||||||
|
array('label'=>$langs->trans("Customers"),'values'=>array(round($third['customer']))),
|
||||||
|
array('label'=>$langs->trans("Suppliers"),'values'=>array(round($third['supplier'])))
|
||||||
|
);
|
||||||
|
dol_print_graph('stats',300,180,$data,0,'pie');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($conf->societe->enabled)
|
||||||
{
|
{
|
||||||
$statstring = "<tr $bc[0]>";
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
|
||||||
$statstring.= '<td><a href="'.DOL_URL_ROOT.'/comm/prospect/prospects.php">'.$langs->trans("Prospects").'</a></td><td align="right">'.round($third['prospect']).'</td>';
|
{
|
||||||
$statstring.= "</tr>";
|
$statstring = "<tr $bc[0]>";
|
||||||
|
$statstring.= '<td><a href="'.DOL_URL_ROOT.'/comm/prospect/prospects.php">'.$langs->trans("Prospects").'</a></td><td align="right">'.round($third['prospect']).'</td>';
|
||||||
|
$statstring.= "</tr>";
|
||||||
|
}
|
||||||
|
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
|
||||||
|
{
|
||||||
|
$statstring.= "<tr $bc[1]>";
|
||||||
|
$statstring.= '<td><a href="'.DOL_URL_ROOT.'/comm/clients.php">'.$langs->trans("Customers").'</a></td><td align="right">'.round($third['customer']).'</td>';
|
||||||
|
$statstring.= "</tr>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$statstring.= "<tr $bc[1]>";
|
if ($conf->fournisseur->enabled)
|
||||||
$statstring.= '<td><a href="'.DOL_URL_ROOT.'/comm/clients.php">'.$langs->trans("Customers").'</a></td><td align="right">'.round($third['customer']).'</td>';
|
{
|
||||||
$statstring.= "</tr>";
|
$statstring2 = "<tr $bc[0]>";
|
||||||
|
$statstring2.= '<td><a href="'.DOL_URL_ROOT.'/fourn/liste.php">'.$langs->trans("Suppliers").'</a></td><td align="right">'.round($third['supplier']).'</td>';
|
||||||
|
$statstring2.= "</tr>";
|
||||||
|
}
|
||||||
|
print $statstring;
|
||||||
|
print $statstring2;
|
||||||
}
|
}
|
||||||
if ($conf->fournisseur->enabled)
|
|
||||||
{
|
|
||||||
$statstring2 = "<tr $bc[0]>";
|
|
||||||
$statstring2.= '<td><a href="'.DOL_URL_ROOT.'/fourn/liste.php">'.$langs->trans("Suppliers").'</a></td><td align="right">'.round($third['supplier']).'</td>';
|
|
||||||
$statstring2.= "</tr>";
|
|
||||||
}
|
|
||||||
print $statstring;
|
|
||||||
print $statstring2;
|
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("UniqueThirdParties").'</td><td align="right">';
|
print '<tr class="liste_total"><td>'.$langs->trans("UniqueThirdParties").'</td><td align="right">';
|
||||||
print $total;
|
print $total;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user