Release 1.20.1 (#3317)

- improved timesheet calculator with changesets and priority
- calculate and include exported stats (e.g. available in export templates)
- added hourly rate column to timesheet listing
This commit is contained in:
Kevin Papst
2022-05-21 13:13:56 +02:00
committed by GitHub
parent 3e6100f368
commit d5f8655827
15 changed files with 277 additions and 43 deletions

View File

@@ -21,6 +21,14 @@ class TimesheetCountedStatistic implements \JsonSerializable
private $recordRateBillable = 0.0;
private $internalRateBillable = 0.0;
private $recordRateBillableExported = 0.0;
private $recordDurationBillableExported = 0;
private $counterExported = 0;
private $recordDurationExported = 0;
private $recordRateExported = 0.0;
private $internalRateExported = 0.0;
/**
* For unified access, used in frontend.
*
@@ -46,6 +54,16 @@ class TimesheetCountedStatistic implements \JsonSerializable
$this->counterBillable = $counter;
}
public function getCounterExported(): int
{
return $this->counterExported;
}
public function setCounterExported(int $counter): void
{
$this->counterExported = $counter;
}
/**
* Returns the total amount of included timesheet records.
*
@@ -178,6 +196,16 @@ class TimesheetCountedStatistic implements \JsonSerializable
$this->internalRateBillable = $internalRateBillable;
}
public function getInternalRateExported(): float
{
return $this->internalRateExported;
}
public function setInternalRateExported(float $internalRateExported): void
{
$this->internalRateExported = $internalRateExported;
}
/**
* @param float $recordInternalRate
* @return $this
@@ -217,6 +245,16 @@ class TimesheetCountedStatistic implements \JsonSerializable
$this->recordDurationBillable = $recordDuration;
}
public function getDurationBillableExported(): int
{
return $this->recordDurationBillableExported;
}
public function setDurationBillableExported(int $recordDuration): void
{
$this->recordDurationBillableExported = $recordDuration;
}
public function getRateBillable(): float
{
return $this->recordRateBillable;
@@ -227,16 +265,52 @@ class TimesheetCountedStatistic implements \JsonSerializable
$this->recordRateBillable = $recordRate;
}
public function getRateBillableExported(): float
{
return $this->recordRateBillableExported;
}
public function setRateBillableExported(float $recordRate): void
{
$this->recordRateBillableExported = $recordRate;
}
public function getDurationExported(): int
{
return $this->recordDurationExported;
}
public function setDurationExported(int $recordDuration): void
{
$this->recordDurationExported = $recordDuration;
}
public function getRateExported(): float
{
return $this->recordRateExported;
}
public function setRateExported(float $recordRate): void
{
$this->recordRateExported = $recordRate;
}
public function jsonSerialize()
{
return [
'duration' => $this->recordDuration,
'duration_billable' => $this->recordDurationBillable,
'duration_exported' => $this->recordDurationExported,
'duration_billable_exported' => $this->recordDurationBillableExported,
'rate' => $this->recordRate,
'rate_billable' => $this->recordRateBillable,
'rate_exported' => $this->recordRateExported,
'rate_billable_exported' => $this->recordRateBillableExported,
'rate_internal' => $this->recordInternalRate,
'rate_internal_exported' => $this->internalRateExported,
'amount' => $this->counter,
'amount_billable' => $this->counterBillable,
'amount_exported' => $this->counterExported,
];
}
}