diff --git a/.editorconfig b/.editorconfig index a0e669a2ef..b978680c18 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,8 @@ root = true ; Unix-style newlines [*] -end_of_line = LF +end_of_line = lf +charset = utf-8 [*.php] indent_style = space diff --git a/src/Controller/ExportController.php b/src/Controller/ExportController.php index 0cead36534..a2f11d9b88 100644 --- a/src/Controller/ExportController.php +++ b/src/Controller/ExportController.php @@ -143,8 +143,12 @@ protected function getDefaultQuery(): ExportQuery */ protected function getEntries(ExportQuery $query): array { - $query->getBegin()->setTime(0, 0, 0); - $query->getEnd()->setTime(23, 59, 59); + if (null !== $query->getBegin()) { + $query->getBegin()->setTime(0, 0, 0); + } + if (null !== $query->getEnd()) { + $query->getEnd()->setTime(23, 59, 59); + } return $this->timesheetRepository->getTimesheetsForQuery($query, true); } diff --git a/src/Form/Toolbar/AbstractToolbarForm.php b/src/Form/Toolbar/AbstractToolbarForm.php index 65bf3804c8..ea417f8ca3 100644 --- a/src/Form/Toolbar/AbstractToolbarForm.php +++ b/src/Form/Toolbar/AbstractToolbarForm.php @@ -122,10 +122,10 @@ protected function addUserRoleChoice(FormBuilderInterface $builder) ]); } - protected function addDateRangeChoice(FormBuilderInterface $builder, $allowEmpty = true) + protected function addDateRangeChoice(FormBuilderInterface $builder, $allowEmpty = true, $required = false) { $builder->add('daterange', DateRangeType::class, [ - 'required' => false, + 'required' => $required, 'allow_empty' => $allowEmpty, ]); } diff --git a/templates/export/index.html.twig b/templates/export/index.html.twig index a78f286e17..16e7699f63 100644 --- a/templates/export/index.html.twig +++ b/templates/export/index.html.twig @@ -83,7 +83,7 @@ {{ rate|money(currency) }} - + {{ duration }} diff --git a/templates/invoice/index.html.twig b/templates/invoice/index.html.twig index 0f85d39ec9..d686270189 100644 --- a/templates/invoice/index.html.twig +++ b/templates/invoice/index.html.twig @@ -83,7 +83,7 @@ {{ rate|money(model.calculator.currency) }} {{ amount }} - {{ duration }} + {{ duration }} {{ entry.rate|money(model.calculator.currency) }} {% endfor %}