From 1bc0f6c99f303336d706027782c5e83fd7c1e61b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Apr 2015 12:02:32 +0200 Subject: [PATCH] Fix: do not show end date when it is same than start date --- htdocs/core/class/html.formactions.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 333969fc3b3..ee26ca2ba7b 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -210,7 +210,10 @@ class FormActions { $tmpa=dol_getdate($action->datep); $tmpb=dol_getdate($action->datef); - if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) print '-'.dol_print_date($action->datef,'hour'); + if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) + { + if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($action->datef,'hour'); + } else print '-'.dol_print_date($action->datef,'dayhour'); } print '';