From 4fa8f7c7478a76f68e2ae8925fecf249f7ee51d4 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 11 Dec 2006 14:52:16 +0000 Subject: [PATCH] Ajout des graphs generes par les scripts cron --- htdocs/product/stats/fiche.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index f99eac0a9b9..21105f5b550 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -102,12 +102,29 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$langs->trans("Status").''; print $product->getLibStatut(2); print ''; + //show_stats_for_company($product,$socid); - show_stats_for_company($product,$socid); + /* + * Graphs additionels generes pas les cron + * + */ + $year = strftime('%Y',time()); + $file = get_exdir($product->id, 3) . "ventes-".$year."-".$product->id.".png"; - print ''; - print ''; + if (file_exists (DOL_DATA_ROOT.'/graph/product/'.$file) ) + { + print 'Ventes'; + + $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_product&file='.$file; + print 'Ventes'; + $file = get_exdir($product->id, 3) . "ventes-".$product->id.".png"; + $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_product&file='.$file; + print 'Ventes'; + print ''; + } + print ''; + print ''; print '';