diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 0479fe007ac..7e1a5e9c9c0 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -895,9 +895,10 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
$title=$langs->trans("Projects");
if (strcmp($statut, '') && $statut >= 0) $title=$langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$statut]);
+ $arrayidtypeofcontact=array();
+
print '
';
- $sql = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_amount, COUNT(DISTINCT t.rowid) as nb"; // We use DISTINCT here because line can be doubled if task has 2 links to same user
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
if ($mytasks)
{
@@ -916,9 +917,9 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
{
$sql.= " AND p.rowid = t.fk_projet";
$sql.= " AND ec.element_id = t.rowid";
- $sql.= " AND ctc.rowid = ec.fk_c_type_contact";
- $sql.= " AND ctc.element = 'project_task'";
$sql.= " AND ec.fk_socpeople = ".$user->id;
+ $sql.= " AND ec.fk_c_type_contact = ctc.rowid"; // Replace the 2 lines with ec.fk_c_type_contact in $arrayidtypeofcontact
+ $sql.= " AND ctc.element = 'project_task'";
}
if ($statut >= 0)
{
@@ -938,14 +939,40 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
$sql.= " AND (p.datee IS NULL OR p.datee >= ".$db->idate(dol_get_first_day($project_year_filter,1,false)).")";
}
}
- $sql.= " GROUP BY p.rowid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount";
- $sql.= " ORDER BY p.title, p.ref";
+
+ // Get id of project we must show tasks
+ $arrayidofprojects=array();
+ $sql1 = "SELECT p.rowid as projectid";
+ $sql1.= $sql;
+ $resql = $db->query($sql1);
+ if ($resql)
+ {
+ $i=0;
+ $num = $db->num_rows($resql);
+ while ($i < $num)
+ {
+ $objp = $db->fetch_object($resql);
+ $arrayidofprojects[$objp->projectid]=$objp->projectid;
+ $i++;
+ }
+ }
+ else dol_print_error($db);
+ if (empty($arrayidofprojects)) $arrayidofprojects[0]=-1;
+
+ // Get list of project with calculation on tasks
+ $sql2 = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_amount,";
+ $sql2.= " COUNT(t.rowid) as nb, SUM(t.planned_workload) as planned_workload, SUM(t.planned_workload * t.progress / 100) as declared_progess_workload";
+ $sql2.= " FROM ".MAIN_DB_PREFIX."projet as p";
+ $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet";
+ $sql2.= " WHERE p.rowid IN (".join(',',$arrayidofprojects).")";
+ $sql2.= " GROUP BY p.rowid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount";
+ $sql2.= " ORDER BY p.title, p.ref";
$var=true;
- $resql = $db->query($sql);
- if ( $resql )
+ $resql = $db->query($sql2);
+ if ($resql)
{
- $total_task = 0;
+ $total_task = 0;
$total_opp_amount = 0;
$ponderated_opp_amount = 0;
@@ -959,7 +986,12 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
print_liste_field_titre($langs->trans("OpportunityAmount"),"","","","",'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("OpportunityStatus"),"","","","",'align="right"',$sortfield,$sortorder);
}
- if (empty($conf->global->PROJECT_HIDE_TASKS)) print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder);
+ if (empty($conf->global->PROJECT_HIDE_TASKS))
+ {
+ print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("PlannedWorkload"),"","","","",'align="right"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("ProgressDeclared"),"","","","",'align="right"',$sortfield,$sortorder);
+ }
print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder);
print "\n";
@@ -993,7 +1025,22 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
print '';
}
$projectstatic->statut = $objp->status;
- if (empty($conf->global->PROJECT_HIDE_TASKS)) print '| '.$objp->nb.' | ';
+ if (empty($conf->global->PROJECT_HIDE_TASKS))
+ {
+ print ''.$objp->nb.' | ';
+
+ $plannedworkload=$objp->planned_workload;
+ $total_plannedworkload+=$plannedworkload;
+ print ''.($plannedworkload?convertSecondToTime($plannedworkload):'').' | ';
+
+ $declaredprogressworkload=$objp->declared_progess_workload;
+ $total_declaredprogressworkload+=$declaredprogressworkload;
+ print '';
+ //print $objp->planned_workload.'-'.$objp->declared_progess_workload." ";
+ print ($plannedworkload?round(100*$declaredprogressworkload/$plannedworkload,0).'%':'');
+ print ' | ';
+ }
+
print ''.$projectstatic->getLibStatut(3).' | ';
print "\n";
@@ -1012,7 +1059,12 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
print ''.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).' | ';
print ''.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmount"), 1).' | ';
}
- if (empty($conf->global->PROJECT_HIDE_TASKS)) print ''.$total_task.' | ';
+ if (empty($conf->global->PROJECT_HIDE_TASKS))
+ {
+ print ''.$total_task.' | ';
+ print ''.($total_plannedworkload?convertSecondToTime($total_plannedworkload):'').' | ';
+ print ''.($total_plannedworkload?round(100*$total_declaredprogressworkload/$total_plannedworkload,0).'%':'').' | ';
+ }
print ' | ';
print '';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index eacf9b6e5ce..892aa415c92 100755
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -366,7 +366,7 @@ HideAnyVATInformationOnPDF=Hide all information related to VAT on generated PDF
HideDescOnPDF=Hide products description on generated PDF
HideRefOnPDF=Hide products ref. on generated PDF
HideDetailsOnPDF=Hide products lines details on generated PDF
-PlaceCustomerAddressToIsoLocation=Use ISO location for customer address
+PlaceCustomerAddressToIsoLocation=Use french standard position (La PosteĆ for customer address position
Library=Library
UrlGenerationParameters=Parameters to secure URLs
SecurityTokenIsUnique=Use a unique securekey parameter for each URL
@@ -1116,7 +1116,7 @@ GetBarCode=Get barcode
EmptyNumRefModelDesc=The code is free. This code can be modified at any time.
##### Module password generation
PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: 8 characters containing shared numbers and characters in lowercase.
-PasswordGenerationNone=Do not suggest any generated password. Password must be type in manually.
+PasswordGenerationNone=Do not suggest any generated password. Password must be typed in manually.
PasswordGenerationPerso=Return a password according to your personally defined configuration.
SetupPerso=According to your configuration
PasswordPatternDesc=Password pattern description
@@ -1674,6 +1674,7 @@ InstallModuleFromWebHasBeenDisabledByFile=Install of external module from applic
ConfFileMuseContainCustom=Installing an external module from application save the module files into directory %s. To have this directory processed by Dolibarr, you must setup your conf/conf.php to have option
- $dolibarr_main_url_root_alt enabled to value $dolibarr_main_url_root_alt="/custom"
- $dolibarr_main_document_root_alt enabled to value "%s/custom"
HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over
HighlightLinesColor=Color of highlight line when mouse move passes over (keep empty for no highlight)
+LinkColor=Color of links
PressF5AfterChangingThis=Press F5 on keyboard after changing this value to have it effective
NotSupportedByAllThemes=Will works with eldy theme but is not supported by all themes
BackgroundColor=Background color
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index e2f6933d352..f9c2452e4ce 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -2459,7 +2459,6 @@ input.liste_titre {
color: #332266;
font-weight: normal;
white-space: nowrap;
- padding: 4px;
}
form.liste_total div {
border-top: 1px solid #DDDDDD;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index f912038a1df..7a42ab1f3bb 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -707,11 +707,12 @@ img.photoref {
box-shadow: 3px 3px 4px #DDD;
}
.underrefbanner {
+}
+.underbanner {
border-bottom: 2px solid #888;
}
-
/* ============================================================================== */
/* Menu top et 1ere ligne tableau */
/* ============================================================================== */