Fix late satus on contract service line
This commit is contained in:
parent
417b2f566f
commit
c3bb4a89e4
@ -1567,7 +1567,11 @@ else
|
||||
{
|
||||
print dol_print_date($db->jdate($objp->date_debut));
|
||||
// Warning si date prevu passee et pas en service
|
||||
if ($objp->statut == 0 && $db->jdate($objp->date_debut) < ($now - $conf->contrat->services->inactifs->warning_delay)) { print " ".img_warning($langs->trans("Late")); }
|
||||
if ($objp->statut == 0 && $db->jdate($objp->date_debut) < ($now - $conf->contrat->services->inactifs->warning_delay)) {
|
||||
$warning_delay=$conf->contrat->services->inactifs->warning_delay / 3600 / 24;
|
||||
$textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days");
|
||||
print " ".img_warning($textlate);
|
||||
}
|
||||
}
|
||||
else print $langs->trans("Unknown");
|
||||
print ' - ';
|
||||
@ -1575,7 +1579,11 @@ else
|
||||
if ($objp->date_fin)
|
||||
{
|
||||
print dol_print_date($db->jdate($objp->date_fin));
|
||||
if ($objp->statut == 4 && $db->jdate($objp->date_fin) < ($now - $conf->contrat->services->expires->warning_delay)) { print " ".img_warning($langs->trans("Late")); }
|
||||
if ($objp->statut == 4 && $db->jdate($objp->date_fin) < ($now - $conf->contrat->services->expires->warning_delay)) {
|
||||
$warning_delay=$conf->contrat->services->expires->warning_delay / 3600 / 24;
|
||||
$textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days");
|
||||
print " ".img_warning($textlate);
|
||||
}
|
||||
}
|
||||
else print $langs->trans("Unknown");
|
||||
|
||||
|
||||
@ -361,7 +361,12 @@ if ($resql)
|
||||
if (($mode == "" || $mode == -1) || $mode < 5)
|
||||
{
|
||||
print '<td align="center">'.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite)):' ');
|
||||
if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5) print img_warning($langs->trans("Late"));
|
||||
if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5)
|
||||
{
|
||||
$warning_delay=$conf->contrat->services->expires->warning_delay / 3600 / 24;
|
||||
$textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days");
|
||||
print img_warning($textlate);
|
||||
}
|
||||
else print ' ';
|
||||
}
|
||||
if (($mode == "" || $mode == -1) || $mode >= 5) print '<td align="center">'.dol_print_date($db->jdate($obj->date_cloture));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user