do not apply rate factor multiple times (#2807)

This commit is contained in:
Kevin Papst
2021-10-03 17:40:36 +02:00
committed by GitHub
parent b6430d5622
commit ea415e33f5

View File

@@ -85,7 +85,11 @@ final class RateService implements RateServiceInterface
}
}
$factor = $this->getRateFactor($record);
$factor = 1.00;
// do not apply once a value was calculated - see https://github.com/kevinpapst/kimai2/issues/1988
if ($record->getFixedRate() === null && $record->getHourlyRate() === null) {
$factor = $this->getRateFactor($record);
}
$factoredHourlyRate = (float) ($hourlyRate * $factor);
$factoredInternalRate = (float) ($internalRate * $factor);