'."\n";
// Fields title search
// --------------------------------------------------------------------
@@ -865,6 +865,9 @@ while ($i < $imaxinloop) {
if (!$i) {
$totalarray['type'][$totalarray['nbfield']] = 'duration';
}
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'fd.duree';
+ }
$totalarray['val']['fd.duree'] += $obj->duree;
}
// Action column
diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php
index 8e60b2a296c..c235dec7e63 100644
--- a/htdocs/modulebuilder/template/admin/setup.php
+++ b/htdocs/modulebuilder/template/admin/setup.php
@@ -55,6 +55,9 @@ global $langs, $user;
// Libraries
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
require_once '../lib/mymodule.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
+
+
//require_once "../class/myclass.class.php";
// Translations
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 78dd11c9fd0..936633508fa 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -500,11 +500,11 @@ llxHeader("", $title, $help_url);
$titleboth = $langs->trans("LeadsOrProjects");
$titlenew = $langs->trans("NewLeadOrProject"); // Leads and opportunities by default
-if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
+if (!getDolGlobalInt('PROJECT_USE_OPPORTUNITIES')) {
$titleboth = $langs->trans("Projects");
$titlenew = $langs->trans("NewProject");
}
-if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
+if (getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') == 2) { // 2 = leads only
$titleboth = $langs->trans("Leads");
$titlenew = $langs->trans("NewLead");
}
diff --git a/htdocs/projet/class/taskstats.class.php b/htdocs/projet/class/taskstats.class.php
index 5794d585101..c3b3a5b716a 100644
--- a/htdocs/projet/class/taskstats.class.php
+++ b/htdocs/projet/class/taskstats.class.php
@@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
include_once DOL_DOCUMENT_ROOT.'/core/class/stats.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@@ -195,7 +196,7 @@ class TaskStats extends Stats
}
- /**
+ /**
* Return the Task amount by month for a year
*
* @param int $year Year to scan
@@ -208,7 +209,7 @@ class TaskStats extends Stats
return array();
}
- /**
+ /**
* Return average of entity by month
* @param int $year year number
* @return int value
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index ceddeedfd33..94ed0edaffd 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -191,7 +191,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_project_ref = '';
$search_project_label = '';
$search_task_label = '';
- $search_user = 0;
+ $search_user = -1;
$search_valuebilled = '';
$search_product_ref = '';
$toselect = array();
@@ -1446,7 +1446,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
print $langs->trans('InvoiceToUse');
print '';
print '| ';
- $form->selectInvoice('invoice', '', 'invoiceid', 24, 0, $langs->trans('NewInvoice'), 1, 0, 0, 'maxwidth500', '', 'all');
+ $form->selectInvoice($projectstatic->thirdparty->id, '', 'invoiceid', 24, 0, $langs->trans('NewInvoice'), 1, 0, 0, 'maxwidth500', '', 'all');
print ' | ';
print '';
/*print '';
@@ -1561,7 +1561,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
if (empty($search_user)) {
$search_user = $user->id;
}
- $sql .= " AND t.fk_user = ".((int) $search_user);
+ if ($search_user > 0) $sql .= " AND t.fk_user = ".((int) $search_user);
}
if ($search_note) {