diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index 8e14a322d9b..bf2228d752a 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -94,7 +94,7 @@ class box_factures_fourn_imp extends ModeleBoxes $now=gmmktime(); $i = 0; - $l_due_date = $langs->trans('Late').' ('.strtolower($langs->trans('DateEcheance')).': %s)'; + $l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)'; while ($i < $num) { @@ -102,7 +102,7 @@ class box_factures_fourn_imp extends ModeleBoxes $datelimite=$db->jdate($objp->datelimite); $late=''; - if ($datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); + if ($datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 8f2a0b21037..14d09ca39a4 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -176,7 +176,7 @@ elseif ($action == 'setdate' && $user->rights->fournisseur->facture->creer) $result=$object->update($user); if ($result < 0) dol_print_error($db,$object->error); } -elseif ($action == 'setdate_echeance' && $user->rights->fournisseur->facture->creer) +elseif ($action == 'setdate_lim_reglement' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $object->date_echeance=dol_mktime(12,0,0,$_POST['date_lim_reglementmonth'],$_POST['date_lim_reglementday'],$_POST['date_lim_reglementyear']); @@ -1346,6 +1346,7 @@ else // Due date print '