diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index 7ca875fbbfd..416e45a3a24 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -115,10 +115,16 @@ if ($_GET["id"]) /* ************************************************************************** */ print "
\n"; + $year = strftime("%Y",time()); + $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&file=entrepot-'.$entrepot->id.'-'.$year.'.png'; + print 'Valorisation du stock année '.($year).''; - $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&file=entrepot-'.$entrepot->id.'.png'; - - print 'Valorisation du stock'; + if (file_exists(DOL_DATA_ROOT.'/graph/entrepot/entrepot-'.$entrepot->id.'-'.($year-1).'.png')) + { + $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&file=entrepot-'.$entrepot->id.'-'.($year-1).'.png'; + print '
Valorisation du stock année '.($year-1).''; + } + print "
"; }