mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
FIX date and user cloture / closing display
temporary fix while convert french to english term in dolibarr
This commit is contained in:
@@ -383,19 +383,20 @@ function dol_print_object_info($object, $usetable = 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// User close
|
// User close
|
||||||
if (!empty($object->user_cloture))
|
if (!empty($object->user_cloture) || !empty($object->user_closing))
|
||||||
{
|
{
|
||||||
|
if (isset($object->user_cloture) && !empty($object->user_cloture)) $object->user_closing = $object->user_cloture;
|
||||||
if ($usetable) print '<tr><td class="titlefield">';
|
if ($usetable) print '<tr><td class="titlefield">';
|
||||||
print $langs->trans("ClosedBy");
|
print $langs->trans("ClosedBy");
|
||||||
if ($usetable) print '</td><td>';
|
if ($usetable) print '</td><td>';
|
||||||
else print ': ';
|
else print ': ';
|
||||||
if (is_object($object->user_cloture))
|
if (is_object($object->user_closing))
|
||||||
{
|
{
|
||||||
if ($object->user_cloture->id) print $object->user_cloture->getNomUrl(1, '', 0, 0, 0);
|
if ($object->user_closing->id) print $object->user_closing->getNomUrl(1, '', 0, 0, 0);
|
||||||
else print $langs->trans("Unknown");
|
else print $langs->trans("Unknown");
|
||||||
} else {
|
} else {
|
||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
$userstatic->fetch($object->user_cloture);
|
$userstatic->fetch($object->user_closing);
|
||||||
if ($userstatic->id) print $userstatic->getNomUrl(1, '', 0, 0, 0);
|
if ($userstatic->id) print $userstatic->getNomUrl(1, '', 0, 0, 0);
|
||||||
else print $langs->trans("Unknown");
|
else print $langs->trans("Unknown");
|
||||||
}
|
}
|
||||||
@@ -404,14 +405,15 @@ function dol_print_object_info($object, $usetable = 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Date close
|
// Date close
|
||||||
if (!empty($object->date_cloture))
|
if (!empty($object->date_cloture) || !empty($object->date_closing))
|
||||||
{
|
{
|
||||||
|
if (isset($object->date_cloture) && !empty($object->date_cloture)) $object->date_closing = $object->date_cloture;
|
||||||
if ($usetable) print '<tr><td class="titlefield">';
|
if ($usetable) print '<tr><td class="titlefield">';
|
||||||
print $langs->trans("DateClosing");
|
print $langs->trans("DateClosing");
|
||||||
if ($usetable) print '</td><td>';
|
if ($usetable) print '</td><td>';
|
||||||
else print ': ';
|
else print ': ';
|
||||||
print dol_print_date($object->date_cloture, 'dayhour');
|
print dol_print_date($object->date_closing, 'dayhour');
|
||||||
if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_cloture + ($deltadateforuser * 3600), "dayhour").' '.$langs->trans("ClientHour");
|
if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_closing + ($deltadateforuser * 3600), "dayhour").' '.$langs->trans("ClientHour");
|
||||||
if ($usetable) print '</td></tr>';
|
if ($usetable) print '</td></tr>';
|
||||||
else print '<br>';
|
else print '<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user