Make message more clear

This commit is contained in:
Laurent Destailleur 2008-11-26 12:21:33 +00:00
parent 0e1fc52054
commit 4b8786fda6

View File

@ -22,7 +22,7 @@
\ingroup stock \ingroup stock
\brief Créé le graph de valorisation du stock \brief Créé le graph de valorisation du stock
\version $Id$ \version $Id$
*/ */
// Test si mode CLI // Test si mode CLI
$sapi_type = php_sapi_name(); $sapi_type = php_sapi_name();
@ -100,6 +100,7 @@ for ($i = 0 ; $i < strftime('%j',$now) ; $i++)
} }
$values[0][$i] = 0; $values[0][$i] = 0;
$legends[$i] = strftime('%b',dolibarr_mktime(12,0,0,1,1,2006) + ($i * 3600 * 24)); $legends[$i] = strftime('%b',dolibarr_mktime(12,0,0,1,1,2006) + ($i * 3600 * 24));
//print $legends[$i].strftime('%j',$now);
} }
/* /*
@ -180,24 +181,26 @@ $file = $dir."/entrepot-".$year.".png";
$title = "Valorisation PMP (Prix Moyen Pondéré) du stock global (euros HT) sur l'année ".$year; $title = "Valorisation PMP (Prix Moyen Pondéré) du stock global (euros HT) sur l'année ".$year;
if ($total[$key] > 0) if ($total[$key] > 0)
graph_datas($file, $title, $values[0], $legends); graph_datas($file, $title, $values[0], $legends);
if ($verbose) if ($verbose)
print "$file\n"; print "$file\n";
/** \brief Build graph /** \brief Build graph
* \param file File * \param file File
* \param title Title * \param title Title
* \param values Value * \param values Value
* \param legends Legend * \param legends Legend
*/ */
function graph_datas($file, $title, $values, $legends) function graph_datas($file, $title, $values, $legends)
{ {
$width=800; $width=800;
$height=230; $height=230;
print "Build graph ".$file."\n";
$newvalues=array(); $newvalues=array();
foreach ($values as $abs=>$ord) foreach ($values as $abs=>$ord)
{ {