if (! $mesg) { $px->SetData($data); $px->SetMaxValue($px->GetCeilMaxValue()); $px->SetMinValue($px->GetFloorMinValue()); $px->SetWidth($GRAPHWIDTH); $px->SetHeight($GRAPHHEIGHT); $px->SetYLabel($langs->trans("NbOfOrders")); $px->SetShading(3); $px->SetHorizTickIncrement(1); $px->SetPrecisionY(0); $px->draw($filename); } $data = $stats->getAmountByMonth($year); if (!$user->rights->societe->client->voir || $user->societe_id) { $filename_amount = $dir.'/ordersamount-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_amount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamount-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurl_amount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamount-'.$user->id.'-'.$year.'.png'; } else { $filename_amount = $dir.'/ordersamount-'.$year.'.png'; if ($mode == 'customer') $fileurl_amount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamount-'.$year.'.png'; if ($mode == 'supplier') $fileurl_amount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamount-'.$year.'.png'; } $px = new DolGraph();