Release 2.10 (#4549)
This commit is contained in:
@@ -135,6 +135,11 @@ final class DateTimeFactory
|
||||
return new DateTime($datetime, $this->getTimezone());
|
||||
}
|
||||
|
||||
public function create(string $datetime = 'now'): \DateTimeImmutable
|
||||
{
|
||||
return new \DateTimeImmutable($datetime, $this->getTimezone());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
* @param null|string $datetime
|
||||
|
||||
@@ -25,7 +25,7 @@ final class RateService implements RateServiceInterface
|
||||
|
||||
public function calculate(Timesheet $record): Rate
|
||||
{
|
||||
if (null === $record->getEnd()) {
|
||||
if ($record->isRunning()) {
|
||||
return new Rate(0.00, 0.00);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ final class DefaultMode extends AbstractTrackingMode
|
||||
|
||||
$this->rounding->roundBegin($timesheet);
|
||||
|
||||
if (null !== $timesheet->getEnd()) {
|
||||
if (!$timesheet->isRunning()) {
|
||||
$this->rounding->roundEnd($timesheet);
|
||||
|
||||
if (null !== $timesheet->getDuration()) {
|
||||
|
||||
Reference in New Issue
Block a user