NEW: Invoice time from task, make task note better display in invoice line

This commit is contained in:
Florian HENRY 2023-02-10 11:11:52 +01:00
parent 356b3af6e6
commit 571caa7a6c

View file

@ -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'] .= "<br/>".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'] .= "<br/>";