diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index de9d92be88d..e6bebcb8992 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -39,9 +39,6 @@ accessforbidden();
$langs->load("bills");
-$warning_delay=31*24*60*60; // Delai affichage warning retard (si retard paiement facture > delai)
-
-
require_once "../facture.class.php";
require_once "../paiement.class.php";
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/project.class.php");
@@ -919,7 +916,7 @@ else
print '
| '.$langs->trans("Date").' | ';
print "".dolibarr_print_date($fac->date,"%A %d %B %Y")." | \n";
print ''.$langs->trans("DateClosing").' | ' . dolibarr_print_date($fac->date_lim_reglement,"%A %d %B %Y");
- if ($fac->date_lim_reglement < (time() - $warning_delay) && ! $fac->paye && $fac->statut == 1 && ! $fac->am) print img_warning($langs->trans("Late"));
+ if ($fac->date_lim_reglement < (time() - $conf->facture->client->warning_delay) && ! $fac->paye && $fac->statut == 1 && ! $fac->am) print img_warning($langs->trans("Late"));
print " |
";
print '';
@@ -1732,7 +1729,7 @@ else
print '| '.img_object($langs->trans("ShowBill"),"bill").' ';
print ''.$objp->facnumber.''.$objp->increment;
- if ($objp->datelimite < (time() - $warning_delay) && ! $objp->paye && $objp->fk_statut == 1 && ! $objp->am) print img_warning($langs->trans("Late"));
+ if ($objp->datelimite < (time() - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1 && ! $objp->am) print img_warning($langs->trans("Late"));
print " | \n";
if ($objp->df > 0 )