fix one-minute rounding bug in quick-entries (#3580)

* fix one-minute rounding bug for quick entries form
* allow to delete and create/update timesheets in one go
* prevent issues with negative durations
This commit is contained in:
Kevin Papst
2022-10-16 01:05:38 +02:00
committed by GitHub
parent a5556a0c63
commit 5fa10dfdf1
2 changed files with 21 additions and 18 deletions

View File

@@ -81,7 +81,7 @@ class QuickEntryTimesheetType extends AbstractType
try {
if (null !== $duration) {
$end = clone $data->getBegin();
$end->modify('+ ' . $duration . ' seconds');
$end->modify('+ ' . abs($duration) . ' seconds');
$data->setEnd($end);
} else {
$data->setDuration(null);