Debug v23

This commit is contained in:
Laurent Destailleur
2025-11-21 01:02:28 +01:00
parent 6dcaede8fc
commit f68f7c3da8
6 changed files with 108 additions and 15 deletions

View File

@@ -297,16 +297,39 @@ class FormActions
print '<td class="nowraponall nopaddingrightimp">'.$actioncomm->getNomUrl(1, -1).'</td>';
// Date
print '<td class="center nowraponall">'.dol_print_date($actioncomm->datep, 'dayhourreduceformat', 'tzuserrel');
if ($actioncomm->datef) {
print '<td class="center nowraponall nopaddingtopimp nopaddingbottomimp">';
if ($actioncomm->datef) { // There is also a end date
$tmpa = dol_getdate($actioncomm->datep);
$tmpb = dol_getdate($actioncomm->datef);
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) {
// The same day
if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) {
print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel');
print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel');
print '<br><span class="small opacitymedium">';
print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel');
print '-'.dol_print_date($actioncomm->datef, 'hourreduceformat', 'tzuserrel');
print '</span>';
} else {
print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel');
print '<br><span class="small opacitymedium">';
print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel');
print '</span>';
}
} else {
print '-'.dol_print_date($actioncomm->datef, 'dayhourreduceformat', 'tzuserrel');
// Not the same day
print '<div class="center inline-block">';
print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel');
print '<br><span class="small opacitymedium">';
print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel');
print '</span>';
print '</div>';
print ' ';
print '<div class="center inline-block">';
print dol_print_date($actioncomm->datef, 'dayreduceformat', 'tzuserrel');
print '<br><span class="small opacitymedium">';
print dol_print_date($actioncomm->datef, 'hourreduceformat', 'tzuserrel');
print '</span>';
print '</div>';
}
}
print '</td>';