Fixes for invoicing projects where multiple new lines were injected inappropriately
This commit is contained in:
parent
157e27848d
commit
a3e27e8550
|
|
@ -373,9 +373,6 @@ class Task extends BaseModel
|
||||||
$hours = ctrans('texts.hours');
|
$hours = ctrans('texts.hours');
|
||||||
|
|
||||||
$parts = [];
|
$parts = [];
|
||||||
|
|
||||||
// $parts[] = '<div class="task-time-details">';
|
|
||||||
|
|
||||||
$date_time = [];
|
$date_time = [];
|
||||||
|
|
||||||
if ($this->company->invoice_task_datelog) {
|
if ($this->company->invoice_task_datelog) {
|
||||||
|
|
@ -409,10 +406,14 @@ class Task extends BaseModel
|
||||||
$parts[] = $interval_description;
|
$parts[] = $interval_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
// $parts[] = '</div>';
|
//need to return early if there is nothing, otherwise we end up injecting a blank new line.
|
||||||
|
if(count($parts) == 1 && empty($parts[0])) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
return implode(PHP_EOL, $parts);
|
return implode(PHP_EOL, $parts);
|
||||||
})
|
})
|
||||||
|
->filter()//filters any empty strings.
|
||||||
->implode(PHP_EOL);
|
->implode(PHP_EOL);
|
||||||
|
|
||||||
$body = '';
|
$body = '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue