|
@@ -509,12 +509,14 @@ function getNumberInvoicesPieChart($mode)
|
|
|
|
|
|
while ($i < $num) {
|
|
|
$obj = $db->fetch_object($resql);
|
|
|
- /*$dataseries = array(array($langs->trans('InvoiceLate30Days'), $obj->nblate30)
|
|
|
+ /*
|
|
|
+ $dataseries = array(array($langs->trans('InvoiceLate30Days'), $obj->nblate30)
|
|
|
,array($langs->trans('InvoiceLate15Days'), $obj->nblate15 - $obj->nblate30)
|
|
|
,array($langs->trans('InvoiceLateMinus15Days'), $obj->nblatenow - $obj->nblate15)
|
|
|
,array($langs->trans('InvoiceNotLate'), $obj->nbnotlatenow - $obj->nbnotlate15)
|
|
|
,array($langs->trans('InvoiceNotLate15Days'), $obj->nbnotlate15 - $obj->nbnotlate30)
|
|
|
- ,array($langs->trans('InvoiceNotLate30Days'), $obj->nbnotlate30));*/
|
|
|
+ ,array($langs->trans('InvoiceNotLate30Days'), $obj->nbnotlate30));
|
|
|
+ */
|
|
|
$dataseries[$i]=array($langs->trans('NbOfOpenInvoices'), $obj->nblate30, $obj->nblate15 - $obj->nblate30, $obj->nblatenow - $obj->nblate15, $obj->nbnotlatenow - $obj->nbnotlate15, $obj->nbnotlate15 - $obj->nbnotlate30, $obj->nbnotlate30);
|
|
|
$i++;
|
|
|
}
|
|
@@ -561,8 +563,9 @@ function getNumberInvoicesPieChart($mode)
|
|
|
$dolgraph->setShowLegend(2);
|
|
|
$dolgraph->setShowPercent(1);
|
|
|
$dolgraph->SetType(array('bars', 'bars', 'bars', 'bars', 'bars', 'bars'));
|
|
|
- $dolgraph->setHeight('160');
|
|
|
- $dolgraph->setWidth('400');
|
|
|
+ //$dolgraph->SetType(array('pie'));
|
|
|
+ $dolgraph->setHeight('160'); /* 160 min is required to show the 6 lines of legend */
|
|
|
+ $dolgraph->setWidth('450');
|
|
|
$dolgraph->setHideXValues(true);
|
|
|
if ($mode == 'customers') {
|
|
|
$dolgraph->draw('idgraphcustomerinvoices');
|