forked from Wavyzz/dolibarr
Merge remote-tracking branch 'Upstream/develop' into develop-30
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -103,7 +103,8 @@ if ( $resql )
|
||||
print '<td>';
|
||||
$projectstatic->id=$row->rowid;
|
||||
$projectstatic->ref=$row->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
$projectstatic->title=$row->title;
|
||||
print $projectstatic->getNomUrl(1, '', 1);
|
||||
print '</td>';
|
||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||
print "</tr>\n";
|
||||
@@ -158,7 +159,8 @@ if ( $resql )
|
||||
print '<td>';
|
||||
$projectstatic->id=$row->rowid;
|
||||
$projectstatic->ref=$row->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
$projectstatic->title=$row->title;
|
||||
print $projectstatic->getNomUrl(1, '', 1);
|
||||
print '</td>';
|
||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||
print "</tr>\n";
|
||||
@@ -219,7 +221,8 @@ if ( $resql )
|
||||
print '<td>';
|
||||
$projectstatic->id=$row->rowid;
|
||||
$projectstatic->ref=$row->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
$projectstatic->title=$row->title;
|
||||
print $projectstatic->getNomUrl(1, '', 1);
|
||||
print '</td>';
|
||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||
print "</tr>\n";
|
||||
@@ -270,7 +273,8 @@ if ( $resql )
|
||||
print '<td>';
|
||||
$projectstatic->id=$row->rowid;
|
||||
$projectstatic->ref=$row->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
$projectstatic->title=$row->title;
|
||||
print $projectstatic->getNomUrl(1, '', 1);
|
||||
print '</td>';
|
||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||
print "</tr>\n";
|
||||
@@ -317,7 +321,8 @@ if ( $resql )
|
||||
print '<td>';
|
||||
$projectstatic->id=$row->rowid;
|
||||
$projectstatic->ref=$row->ref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
$projectstatic->title=$row->title;
|
||||
print $projectstatic->getNomUrl(1, '', 1);
|
||||
print '</td>';
|
||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -116,7 +116,7 @@ if ($action == 'assign')
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$action='';
|
||||
}
|
||||
|
||||
@@ -148,24 +148,24 @@ if ($action == 'addtime' && $user->rights->projet->creer)
|
||||
{
|
||||
foreach($timespent_duration as $key => $val)
|
||||
{
|
||||
$task->fetch($key);
|
||||
$task->progress = GETPOST($key . 'progress', 'int');
|
||||
$task->timespent_duration = $val;
|
||||
$task->timespent_fk_user = $user->id;
|
||||
$object->fetch($key);
|
||||
$object->progress = GETPOST($key . 'progress', 'int');
|
||||
$object->timespent_duration = $val;
|
||||
$object->timespent_fk_user = $user->id;
|
||||
if (GETPOST($key."hour") != '' && GETPOST($key."hour") >= 0) // If hour was entered
|
||||
{
|
||||
$task->timespent_date = dol_mktime(GETPOST($key."hour"),GETPOST($key."min"),0,GETPOST($key."month"),GETPOST($key."day"),GETPOST($key."year"));
|
||||
$task->timespent_withhour = 1;
|
||||
$object->timespent_date = dol_mktime(GETPOST($key."hour"),GETPOST($key."min"),0,GETPOST($key."month"),GETPOST($key."day"),GETPOST($key."year"));
|
||||
$object->timespent_withhour = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$task->timespent_date = dol_mktime(12,0,0,GETPOST($key."month"),GETPOST($key."day"),GETPOST($key."year"));
|
||||
$object->timespent_date = dol_mktime(12,0,0,GETPOST($key."month"),GETPOST($key."day"),GETPOST($key."year"));
|
||||
}
|
||||
|
||||
$result=$task->addTimeSpent($user);
|
||||
$result=$object->addTimeSpent($user);
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($task->error, $task->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ if ($action == 'assign')
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$action='';
|
||||
}
|
||||
|
||||
@@ -162,16 +162,16 @@ if ($action == 'addtime' && $user->rights->projet->creer)
|
||||
|
||||
if ($newduration > 0)
|
||||
{
|
||||
$task->fetch($taskid);
|
||||
$task->progress = GETPOST($taskid . 'progress', 'int');
|
||||
$task->timespent_duration = $newduration;
|
||||
$task->timespent_fk_user = $usertoprocess->id;
|
||||
$task->timespent_date = dol_time_plus_duree($firstdaytoshow, $key, 'd');
|
||||
$object->fetch($taskid);
|
||||
$object->progress = GETPOST($taskid . 'progress', 'int');
|
||||
$object->timespent_duration = $newduration;
|
||||
$object->timespent_fk_user = $usertoprocess->id;
|
||||
$object->timespent_date = dol_time_plus_duree($firstdaytoshow, $key, 'd');
|
||||
|
||||
$result=$task->addTimeSpent($user);
|
||||
$result=$object->addTimeSpent($user);
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($task->error, $task->errors, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user