monthly budget, monthly report, unified report calculation (#2684)
This commit is contained in:
19
src/Model/Statistic/BudgetStatistic.php
Normal file
19
src/Model/Statistic/BudgetStatistic.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Model\Statistic;
|
||||
|
||||
use App\Model\TimesheetCountedStatistic;
|
||||
|
||||
/**
|
||||
* @final
|
||||
*/
|
||||
class BudgetStatistic extends TimesheetCountedStatistic
|
||||
{
|
||||
}
|
||||
47
src/Model/Statistic/StatisticDate.php
Normal file
47
src/Model/Statistic/StatisticDate.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Model\Statistic;
|
||||
|
||||
final class StatisticDate extends Timesheet
|
||||
{
|
||||
private $date;
|
||||
private $billableDuration = 0;
|
||||
private $billableRate = 0.00;
|
||||
|
||||
public function __construct(\DateTimeInterface $date)
|
||||
{
|
||||
$this->date = clone $date;
|
||||
}
|
||||
|
||||
public function getDate(): \DateTimeInterface
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function getBillableDuration(): int
|
||||
{
|
||||
return $this->billableDuration;
|
||||
}
|
||||
|
||||
public function setBillableDuration(int $billableDuration): void
|
||||
{
|
||||
$this->billableDuration = $billableDuration;
|
||||
}
|
||||
|
||||
public function getBillableRate(): float
|
||||
{
|
||||
return $this->billableRate;
|
||||
}
|
||||
|
||||
public function setBillableRate(float $billableRate): void
|
||||
{
|
||||
$this->billableRate = $billableRate;
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ class Timesheet
|
||||
*/
|
||||
public function getValue(): int
|
||||
{
|
||||
return $this->totalDuration;
|
||||
return $this->getDuration();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ class Timesheet
|
||||
|
||||
public function getTotalDuration(): int
|
||||
{
|
||||
return $this->totalDuration;
|
||||
return $this->getDuration();
|
||||
}
|
||||
|
||||
public function setTotalDuration(int $totalDuration): void
|
||||
@@ -57,7 +57,7 @@ class Timesheet
|
||||
|
||||
public function getTotalRate(): float
|
||||
{
|
||||
return $this->totalRate;
|
||||
return $this->getRate();
|
||||
}
|
||||
|
||||
public function setTotalRate(float $totalRate): void
|
||||
@@ -77,7 +77,7 @@ class Timesheet
|
||||
|
||||
public function getTotalInternalRate(): float
|
||||
{
|
||||
return $this->totalInternalRate;
|
||||
return $this->getInternalRate();
|
||||
}
|
||||
|
||||
public function setTotalInternalRate(float $totalInternalRate): void
|
||||
|
||||
Reference in New Issue
Block a user