fixed null project for advanced invoice calculator (#462)

This commit is contained in:
Kevin Papst
2018-12-03 22:36:38 +01:00
committed by GitHub
parent 35305ad107
commit c58c12ea3d
5 changed files with 18 additions and 0 deletions

View File

@@ -44,6 +44,10 @@ abstract class AbstractMergedCalculator extends AbstractCalculator
$timesheet->setActivity($entry->getActivity());
}
if (null === $timesheet->getProject()) {
$timesheet->setProject($entry->getProject());
}
if (empty($timesheet->getDescription())) {
$timesheet->setDescription($entry->getActivity()->getName());
}

View File

@@ -176,6 +176,7 @@ trait RendererTrait
'entry.date' => $this->getFormattedDateTime($begin),
'entry.user_id' => $user->getId(),
'entry.user_name' => $user->getUsername(),
'entry.user_title' => $user->getTitle(),
'entry.user_alias' => $user->getAlias(),
'entry.activity' => $activity->getName(),
'entry.activity_id' => $activity->getId(),