Merge pull request #9127 from IAS-SYSTEMS-CSC/develop

Fix if time spent minutes was zero
This commit is contained in:
Laurent Destailleur 2018-07-24 17:35:33 +02:00 committed by GitHub
commit 9d1b7e25f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,7 @@ if ($action == 'addtimespent' && $user->rights->projet->lire)
$object->timespent_note = $_POST["timespent_note"];
$object->progress = GETPOST('progress', 'int');
$object->timespent_duration = $_POST["timespent_durationhour"]*60*60; // We store duration in seconds
$object->timespent_duration+= $_POST["timespent_durationmin"]*60; // We store duration in seconds
$object->timespent_duration+= ($_POST["timespent_durationmin"]?$_POST["timespent_durationmin"]:0)*60; // We store duration in seconds
if (GETPOST("timehour") != '' && GETPOST("timehour") >= 0) // If hour was entered
{
$object->timespent_date = dol_mktime(GETPOST("timehour"),GETPOST("timemin"),0,GETPOST("timemonth"),GETPOST("timeday"),GETPOST("timeyear"));