automatic billable calculation (#3200)

This commit is contained in:
Kevin Papst
2022-03-18 22:31:50 +01:00
committed by GitHub
parent f7480902b4
commit 30c7782d6e
34 changed files with 409 additions and 53 deletions

View File

@@ -110,7 +110,7 @@ final class TimesheetService
$mode = $this->trackingModeService->getActiveMode();
$mode->create($timesheet, $request);
$timesheet->setBillable($this->configuration->getTimesheetDefaultBillable());
$timesheet->setBillableMode(Timesheet::BILLABLE_AUTOMATIC);
return $timesheet;
}
@@ -118,6 +118,7 @@ final class TimesheetService
/**
* @param Timesheet $timesheet
* @param Timesheet $copyFrom
* @return Timesheet
* @throws ValidationFailedException for invalid timesheets or running timesheets that should be stopped
* @throws InvalidArgumentException for already persisted timesheets
* @throws AccessDeniedException if user is not allowed to start timesheet