From 9b7a8145d2cfed42daadaa4c404febeab11d8941 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 6 Dec 2006 13:44:32 +0000 Subject: [PATCH] Affichage de l'annee Y-1 --- htdocs/product/stock/fiche-valo.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 "
"; }