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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user