From 14fb2c914aa93123f95a624571b6c4de2dc5d266 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Feb 2016 15:38:24 +0100 Subject: [PATCH] Fix option MAIN_USE_HOURMIN_IN_DATE_RANGE was not supported in output --- htdocs/core/tpl/objectline_view.tpl.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index f71b2b484d1..7162ac66cb9 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -90,12 +90,14 @@ if (empty($usemargins)) $usemargins=0; } else { - if ($line->fk_product > 0) + $format = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE?'dayhour':'day'; + + if ($line->fk_product > 0) { echo $form->textwithtooltip($text,$description,3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):'')); // Show range - echo get_date_range($line->date_start, $line->date_end); + echo get_date_range($line->date_start, $line->date_end, $format); // Add description in form if (! empty($conf->global->PRODUIT_DESC_IN_FORM)) @@ -119,7 +121,7 @@ if (empty($usemargins)) $usemargins=0; } // Show range - echo get_date_range($line->date_start,$line->date_end); + echo get_date_range($line->date_start,$line->date_end, $format); } } ?>