63 |
print '<img src="'.DOL_URL_ROOT.'/showgraph.php?graph='.DOL_DATA_ROOT.'/graph/telephonie/factures/ca_mensuel.png" alt="ca_mensuel">'; |
print '<img src="'.DOL_URL_ROOT.'/showgraph.php?graph='.DOL_DATA_ROOT.'/graph/telephonie/factures/ca_mensuel.png" alt="ca_mensuel">'; |
64 |
|
|
65 |
print '</td><td align="left" valign="top">'; |
print '</td><td align="left" valign="top">'; |
66 |
_legend($db, "factures.ca_mensuel"); |
_legend($db, "factures.ca_mensuel", "%11.2f"); |
67 |
|
|
68 |
print '</td></tr>'; |
print '</td></tr>'; |
69 |
|
|
72 |
print '<img src="'.DOL_URL_ROOT.'/showgraph.php?graph='.DOL_DATA_ROOT.'/graph/telephonie/factures/facture_moyenne.png" alt="facture_moyenne">'; |
print '<img src="'.DOL_URL_ROOT.'/showgraph.php?graph='.DOL_DATA_ROOT.'/graph/telephonie/factures/facture_moyenne.png" alt="facture_moyenne">'; |
73 |
|
|
74 |
print '</td><td align="left" valign="top">'; |
print '</td><td align="left" valign="top">'; |
75 |
_legend($db, "factures.facture_moyenne"); |
_legend($db, "factures.facture_moyenne","%01.1f"); |
76 |
|
|
77 |
print '</td></tr>'; |
print '</td></tr>'; |
78 |
print '<tr><td valign="top" width="50%">'; |
print '<tr><td valign="top" width="50%">'; |
80 |
print '<img src="'.DOL_URL_ROOT.'/showgraph.php?graph='.DOL_DATA_ROOT.'/graph/telephonie/factures/nb_facture.png" alt="nb_facture">'; |
print '<img src="'.DOL_URL_ROOT.'/showgraph.php?graph='.DOL_DATA_ROOT.'/graph/telephonie/factures/nb_facture.png" alt="nb_facture">'; |
81 |
|
|
82 |
print '</td><td align="left" valign="top">'; |
print '</td><td align="left" valign="top">'; |
83 |
_legend($db, "factures.nb_mensuel"); |
_legend($db, "factures.nb_mensuel","%01.0f"); |
84 |
|
|
85 |
print '</td></tr>'; |
print '</td></tr>'; |
86 |
|
|
89 |
$db->close(); |
$db->close(); |
90 |
|
|
91 |
|
|
92 |
function _legend($db, $graph) |
function _legend($db, $graph, $format) |
93 |
{ |
{ |
|
|
|
94 |
print '<table class="noborder" cellspacing="0" cellpadding="4">'; |
print '<table class="noborder" cellspacing="0" cellpadding="4">'; |
95 |
print '<tr class="liste_titre">'; |
print '<tr class="liste_titre">'; |
96 |
print '<td colspan="2">Légende</td></tr>'; |
print '<td colspan="2">Légende</td></tr>'; |
103 |
|
|
104 |
if ($resql) |
if ($resql) |
105 |
{ |
{ |
106 |
$num = $db->num_rows($resql); |
while ($row = $db->fetch_row($resql)) |
|
$i = 0; |
|
|
|
|
|
while ($i < $num) |
|
107 |
{ |
{ |
|
$row = $db->fetch_row($resql); |
|
108 |
$var = !$var; |
$var = !$var; |
109 |
print "<tr $bc[$var]>"; |
print "<tr $bc[$var]>"; |
110 |
print '<td>'.$row[0].'</td><td align="right">'.ceil($row[1]).'</td></tr>'; |
print '<td>'.$row[0].'</td><td align="right">'; |
111 |
|
print sprintf($format ,$row[1]); |
112 |
$i++; |
print '</td></tr>'; |
113 |
} |
} |
114 |
} |
} |
115 |
print '</table>'; |
print '</table>'; |
116 |
} |
} |
117 |
|
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>"); |
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>"); |
120 |
?> |
?> |