Fixed bug duration task when > 1 month

This commit is contained in:
Tomolimo
2021-04-01 10:31:00 +02:00
parent d19435a3dc
commit dad5c11197
2 changed files with 2 additions and 2 deletions

View File

@@ -1736,7 +1736,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
$input['end'] = $options['end_date']->format("Y-m-d H:i:s");
$input['plan']['begin'] = $input['begin'];
$temp = $options['start_date']->diff( $options['end_date'] );
$input['plan']['_duration'] = $temp->d * DAY_TIMESTAMP + $temp->h * HOUR_TIMESTAMP + $temp->i * MINUTE_TIMESTAMP + $temp->s;
$input['plan']['_duration'] = $temp->days * DAY_TIMESTAMP + $temp->h * HOUR_TIMESTAMP + $temp->i * MINUTE_TIMESTAMP + $temp->s;
if ($input['plan']['_duration'] == 0) {
$input['plan']['_duration'] = 60; // at least
}

View File

@@ -1,6 +1,6 @@
<?php
define('PROCESSMAKER_VERSION', '4.0.1');
define('PROCESSMAKER_VERSION', '4.0.2');
// used for case cancellation
define("CANCEL", 256);