This commit is contained in:
Laurent Destailleur 2020-06-26 20:35:06 +02:00
parent ee0bdde8c1
commit 6df049e05c
2 changed files with 7 additions and 8 deletions

View File

@ -1144,7 +1144,7 @@ class DolGraph
foreach ($legends as $val) // Loop on each serie
{
if ($i > 0) $this->stringtoshow .= ', ';
$this->stringtoshow .= "'".$val."'";
$this->stringtoshow .= "'".dol_trunc($val,32)."'";
$i++;
}

View File

@ -166,17 +166,16 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us
$dataseries = array();
if (!empty($conf->product->enabled))
{
$dataseries[] = array($langs->trans("ProductsOnSale"), round($SommeA));
$dataseries[] = array($langs->trans("ProductsOnPurchase"), round($SommeB));
$dataseries[] = array($langs->trans("ProductsNotOnSell"), round($SommeC));
$dataseries[] = array($langs->transnoentitiesnoconv("ProductsOnSale"), round($SommeA));
$dataseries[] = array($langs->transnoentitiesnoconv("ProductsOnPurchase"), round($SommeB));
$dataseries[] = array($langs->transnoentitiesnoconv("ProductsNotOnSell"), round($SommeC));
}
if (!empty($conf->service->enabled))
{
$dataseries[] = array($langs->trans("ServicesOnSale"), round($SommeD));
$dataseries[] = array($langs->trans("ServicesOnPurchase"), round($SommeE));
$dataseries[] = array(dol_trunc($langs->trans("ServicesNotOnSell"), 24), round($SommeF));
$dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnSale"), round($SommeD));
$dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnPurchase"), round($SommeE));
$dataseries[] = array($langs->transnoentitiesnoconv("ServicesNotOnSell"), round($SommeF));
}
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph();
$dolgraph->SetData($dataseries);