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 '';