default value for billable flag and support in batch update (#2851)

This commit is contained in:
Kevin Papst
2021-10-13 15:49:20 +02:00
committed by GitHub
parent 9226daa891
commit 6b066046c6
12 changed files with 92 additions and 51 deletions

View File

@@ -382,6 +382,10 @@ final class SystemConfigurationController extends AbstractController
->setConstraints([
new GreaterThanOrEqual(['value' => 0])
]),
(new Configuration())
->setName('defaults.timesheet.billable')
->setType(YesNoType::class)
->setOptions(['help' => 'default_value_new', 'label' => 'label.billable']),
]),
(new SystemConfigurationModel())
->setSection(SystemConfigurationModel::SECTION_LOCKDOWN)

View File

@@ -364,6 +364,10 @@ abstract class TimesheetAbstractController extends AbstractController
$timesheet->setExported($dto->isExported());
$execute = true;
}
if (null !== $dto->isBillable()) {
$timesheet->setBillable($dto->isBillable());
$execute = true;
}
if ($dto->isRecalculateRates()) {
$timesheet->setFixedRate(null);