new user-year reporting and data-type chooser (#3155)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user