Better way to present open invoice graph

This commit is contained in:
Laurent Destailleur 2021-10-04 05:34:14 +02:00
parent 7b02560c4f
commit 66310b14d7

View File

@ -528,7 +528,7 @@ function getNumberInvoicesPieChart($mode)
$result = '<div class="div-table-responsive-no-min">'; $result = '<div class="div-table-responsive-no-min">';
$result .= '<table class="noborder nohover centpercent">'; $result .= '<table class="noborder nohover centpercent">';
$result .= '<tr class="liste_titre">'; $result .= '<tr class="liste_titre">';
$result .= '<td>'.$langs->trans("Statistics").' - '; $result .= '<td>'.$langs->trans("NbOfOpenInvoices").' - ';
if ($mode == 'customers') { if ($mode == 'customers') {
$result .= $langs->trans("CustomerInvoice"); $result .= $langs->trans("CustomerInvoice");
} elseif ($mode == 'fourn' || $mode == 'suppliers') { } elseif ($mode == 'fourn' || $mode == 'suppliers') {
@ -550,8 +550,9 @@ function getNumberInvoicesPieChart($mode)
$dolgraph->setShowLegend(2); $dolgraph->setShowLegend(2);
$dolgraph->setShowPercent(1); $dolgraph->setShowPercent(1);
$dolgraph->SetType(array('bars', 'bars', 'bars', 'bars', 'bars', 'bars')); $dolgraph->SetType(array('bars', 'bars', 'bars', 'bars', 'bars', 'bars'));
$dolgraph->setHeight('180'); $dolgraph->setHeight('160');
$dolgraph->setWidth('500'); $dolgraph->setWidth('400');
$dolgraph->setHideXValues(true);
if ($mode == 'customers') { if ($mode == 'customers') {
$dolgraph->draw('idgraphcustomerinvoices'); $dolgraph->draw('idgraphcustomerinvoices');
} elseif ($mode == 'fourn' || $mode == 'suppliers') { } elseif ($mode == 'fourn' || $mode == 'suppliers') {