diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php
index f3d5b6039c0..743ba61182b 100644
--- a/htdocs/product/stats/fiche.php
+++ b/htdocs/product/stats/fiche.php
@@ -291,22 +291,22 @@ if ($_GET["id"])
print '
';
print '
| ';
print '';
- if (file_exists($filenbpropal) && filemtime($filenbpropal))
+ if (file_exists($filenbpropal) && filemtime($filenbpropal) && ! $px->isGraphKo())
{
print '| '.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpropal),"%d %b %Y %H:%M:%S")).' | ';
}
else
{
- print ''.$langs->trans("ChartNotGenerated").' | ';
+ print ''.($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")).' | ';
}
print '['.$langs->trans("ReCalculate").'] | ';
- if (file_exists($filenbpiece) && filemtime($filenbpiece))
+ if (file_exists($filenbpiece) && filemtime($filenbpiece) && ! $px->isGraphKo())
{
print ''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpiece),"%d %b %Y %H:%M:%S")).' | ';
}
else
{
- print ''.$langs->trans("ChartNotGenerated").' | ';
+ print ''.($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")).' | ';
}
print '['.$langs->trans("ReCalculate").'] |
';
@@ -321,22 +321,22 @@ if ($_GET["id"])
print '
';
print '';
print '';
- if (file_exists($filenbvente) && filemtime($filenbvente))
+ if (file_exists($filenbvente) && filemtime($filenbvente) && ! $px->isGraphKo())
{
print '| '.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbvente),"%d %b %Y %H:%M:%S")).' | ';
}
else
{
- print ''.$langs->trans("ChartNotGenerated").' | ';
+ print ''.($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")).' | ';
}
print '['.$langs->trans("ReCalculate").'] | ';
- if (file_exists($filenbpiece) && filemtime($filenbpiece))
+ if (file_exists($filenbpiece) && filemtime($filenbpiece) && ! $px->isGraphKo())
{
print ''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpiece),"%d %b %Y %H:%M:%S")).' | ';
}
else
{
- print ''.$langs->trans("ChartNotGenerated").' | ';
+ print ''.($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")).' | ';
}
print '['.$langs->trans("ReCalculate").'] |
';