From 374ff46c3156888a5988d74f740bcc39d5e21f93 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 6 Dec 2006 16:31:33 +0000 Subject: [PATCH] Acces au graph N-1 --- htdocs/product/stock/valo.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 90e325a1cc3..8a5f6b2cc0a 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -114,9 +114,17 @@ if ($result) print ""; print '
'; - $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&file=entrepot.png'; - print ''; + $year = strftime("%Y",time()); + $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&file=entrepot-'.$year.'.png'; + print 'Valorisation du stock année '.($year).''; + + if (file_exists(DOL_DATA_ROOT.'/graph/entrepot/entrepot-'.($year-1).'.png')) + { + $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&file=entrepot-'.($year-1).'.png'; + print '
Valorisation du stock année '.($year-1).''; + } + } else {