forked from Wavyzz/dolibarr
Fix: warning not visible when required
This commit is contained in:
@@ -94,7 +94,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
|||||||
$now=gmmktime();
|
$now=gmmktime();
|
||||||
|
|
||||||
$i = 0;
|
$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)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
@@ -102,7 +102,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
|||||||
$datelimite=$db->jdate($objp->datelimite);
|
$datelimite=$db->jdate($objp->datelimite);
|
||||||
|
|
||||||
$late='';
|
$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"',
|
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||||
'logo' => $this->boximg,
|
'logo' => $this->boximg,
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ elseif ($action == 'setdate' && $user->rights->fournisseur->facture->creer)
|
|||||||
$result=$object->update($user);
|
$result=$object->update($user);
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
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->fetch($id);
|
||||||
$object->date_echeance=dol_mktime(12,0,0,$_POST['date_lim_reglementmonth'],$_POST['date_lim_reglementday'],$_POST['date_lim_reglementyear']);
|
$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
|
// Due date
|
||||||
print '<tr><td>'.$form->editfieldkey("DateMaxPayment",'date_lim_reglement',$object->date_echeance,$object,($object->statut<2 && $user->rights->fournisseur->facture->creer && $object->getSommePaiement() <= 0),'datepicker').'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey("DateMaxPayment",'date_lim_reglement',$object->date_echeance,$object,($object->statut<2 && $user->rights->fournisseur->facture->creer && $object->getSommePaiement() <= 0),'datepicker').'</td><td colspan="3">';
|
||||||
print $form->editfieldval("DateMaxPayment",'date_lim_reglement',$object->date_echeance,$object,($object->statut<2 && $user->rights->fournisseur->facture->creer && $object->getSommePaiement() <= 0),'datepicker');
|
print $form->editfieldval("DateMaxPayment",'date_lim_reglement',$object->date_echeance,$object,($object->statut<2 && $user->rights->fournisseur->facture->creer && $object->getSommePaiement() <= 0),'datepicker');
|
||||||
|
if ((empty($action) || $action == 'view') && $object->date_echeance && $object->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)) print img_warning($langs->trans('Late'));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
|
|||||||
Reference in New Issue
Block a user