if time spent minutes zero

This commit is contained in:
ias-ceo 2018-07-20 16:16:27 +03:00
parent e362a0e9df
commit 84bfe2965b

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"));