From 571caa7a6ca70978abbce55b8963d9fcaeca3472 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 10 Feb 2023 11:11:52 +0100 Subject: [PATCH] NEW: Invoice time from task, make task note better display in invoice line --- htdocs/projet/tasks/time.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index a4661911910..f52377e19da 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -587,7 +587,12 @@ if ($action == 'confirm_generateinvoice') { $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username.($object->timespent_note ? ' - '.$object->timespent_note : ''); // TODO Add user name in note + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; // TODO Add user name in note + if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_DETAILS) && !empty($object->timespent_note)) { + $arrayoftasks[$object->timespent_id]['note'] .= "
".dol_nl2br($object->timespent_note); + } else { + $arrayoftasks[$object->timespent_id]['note'] .= "\n".$object->timespent_note; + } if (!empty($withdetail)) { if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { $arrayoftasks[$object->timespent_id]['note'] .= "
";