new user-year reporting and data-type chooser (#3155)

This commit is contained in:
Kevin Papst
2022-02-16 12:18:04 +01:00
committed by GitHub
parent 1852d71974
commit 85a63c4b78
58 changed files with 1862 additions and 683 deletions

View File

@@ -11,11 +11,9 @@ namespace App\Reporting;
abstract class AbstractUserList
{
/**
* @var \DateTime
*/
private $date;
private $decimal = false;
private $sumType = 'duration';
public function getDate(): ?\DateTime
{
@@ -36,4 +34,18 @@ abstract class AbstractUserList
{
$this->decimal = $decimal;
}
public function getSumType(): string
{
return $this->sumType;
}
public function setSumType(string $sumType): void
{
if (!\in_array($sumType, ['duration', 'rate', 'internalRate'])) {
throw new \InvalidArgumentException('Unknown sum type');
}
$this->sumType = $sumType;
}
}