diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d89800227ab..b683bcb0f6c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1376,7 +1376,7 @@ class Form $out.= '>'; } - $out.= $userstatic->getFullName($langs, 0, 0, $maxlength); + $out.= $userstatic->getFullName($langs, 0, -1, $maxlength); // Complete name with more info $moreinfo=0; if (! empty($conf->global->MAIN_SHOW_LOGIN)) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 004ad3a619f..0569e90d903 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -878,16 +878,18 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) * @param int $mytasks Limited to task i am contact to * @param int $statut -1=No filter on statut, 0 or 1 = Filter on status * @param array $listofoppstatus List of opportunity status + * @param array $hiddenfields List of fields to not show * @return void */ -function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=0, $statut=-1, $listofoppstatus=array()) +function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=0, $statut=-1, $listofoppstatus=array(),$hiddenfields=array()) { global $langs,$conf,$user,$bc; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $projectstatic=new Project($db); - + $thirdpartystatic=new Societe($db); + $sortfield=''; $sortorder=''; $project_year_filter=0; @@ -895,9 +897,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 +919,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 +941,41 @@ 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_soc, s.nom as socname, 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."societe as s ON s.rowid = p.fk_soc"; + $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_soc, 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; @@ -954,12 +984,18 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= print ''; print_liste_field_titre($title.' '.$num.'',$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { 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); + if (! in_array('declaredprogress', $hiddenfields)) print_liste_field_titre($langs->trans("ProgressDeclared"),"","","","",'align="right"',$sortfield,$sortorder); + } print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder); print "\n"; @@ -980,7 +1016,17 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= print ''; + print ' - '.dol_trunc($objp->title,24); + print ''; + print ''; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print ''; } $projectstatic->statut = $objp->status; - if (empty($conf->global->PROJECT_HIDE_TASKS)) print ''; + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + print ''; + + $plannedworkload=$objp->planned_workload; + $total_plannedworkload+=$plannedworkload; + print ''; + + if (! in_array('declaredprogress', $hiddenfields)) + { + $declaredprogressworkload=$objp->declared_progess_workload; + $total_declaredprogressworkload+=$declaredprogressworkload; + print ''; + } + } + print ''; print "\n"; @@ -1004,14 +1068,22 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= $i++; } - print '"; + print ''; + print '"; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { - print ''; - print ''; + print ''; + print ''; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) print ''; - + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + print ''; + print ''; + if (! in_array('declaredprogress', $hiddenfields)) print ''; + } + print ''; + print ''; + $db->free($resql); } else 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/product/index.php b/htdocs/product/index.php index a47f4488ea4..c2a702e796a 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -369,6 +369,7 @@ $db->close(); function activitytrim($product_type) { global $conf,$langs,$db; + global $bc; // We display the last 3 years $yearofbegindate=date('Y',dol_time_plus_duree(time(), -3, "y")); @@ -415,6 +416,8 @@ function activitytrim($product_type) } $i = 0; + $var=true; + while ($i < $num) { $objp = $db->fetch_object($result); @@ -422,7 +425,8 @@ function activitytrim($product_type) { if ($trim1+$trim2+$trim3+$trim4 > 0) { - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; @@ -455,7 +459,8 @@ function activitytrim($product_type) } if ($trim1+$trim2+$trim3+$trim4 > 0) { - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 2f45dce9906..11ae9e78906 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -216,7 +216,7 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) // List of draft projects -print_projecttasks_array($db,$form,$socid,$projectsListId,0,0,$listofoppstatus); +print_projecttasks_array($db,$form,$socid,$projectsListId,0,0,$listofoppstatus,array('declaredprogress')); print '
'; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 48fb4262925..d8bbe966843 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1695,9 +1695,14 @@ span.tabspan { div.divButAction { margin-bottom: 1.4em; } +span.butAction, span.butActionDelete { + cursor: pointer; +} + .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { text-decoration: none; margin: 0em em; + padding: 0.6em em; font-family: ; /* for bootstrap look color: #fff; @@ -1727,9 +1732,16 @@ div.divButAction { margin-bottom: 1.4em; } border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); display: inline-block; - padding: 4px 14px; text-align: center; cursor: pointer; + color: #fff; + background: rgb(); + background-image: linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%); + background-image: -o-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%); + background-image: -moz-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%); + background-image: -webkit-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%); + background-image: -ms-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%); + color: #333333; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); background-color: #f5f5f5; @@ -1738,6 +1750,7 @@ div.divButAction { margin-bottom: 1.4em; } background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); border-color: #e6e6e6 #e6e6e6 #bfbfbf; @@ -1789,13 +1802,13 @@ div.divButAction { margin-bottom: 1.4em; } white-space: nowrap !important; cursor: not-allowed !important; margin: 0em em; + padding: 0.6em em; font-family: !important; /* for bootstrap look color: #333; background-color: #e6e6e6; border-color: #adadad; display: inline-block; - padding: 6px 12px; margin-bottom: 0; font-weight: normal !important; line-height: 1.42857143; @@ -1817,7 +1830,8 @@ div.divButAction { margin-bottom: 1.4em; } border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); display: inline-block; - padding: 4px 14px; + margin: 0em em; + padding: 0.6em em; text-align: center; cursor: pointer; color: #999 !important; @@ -1841,16 +1855,7 @@ div.divButAction { margin-bottom: 1.4em; } -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -} -global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?> -.butActionRefused { - display: none; -} - - -span.butAction, span.butActionDelete { - cursor: pointer; } /* Prepare for bootstrap look @@ -1923,6 +1928,12 @@ a.butAction:link, a.butAction:visited, a.butAction:hover, a.butAction:active { } End bootstrap */ +global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?> +.butActionRefused { + display: none; +} + + /* ============================================================================== */ @@ -2341,8 +2352,13 @@ table.dataTable td { } tr.even td, tr.pair td, tr.odd td, tr.impair td, form.odd div.tagtd, form.impair div.tagtd, form.pair div.tagtd, div.impair div.tagtd, div.pair div.tagtd, div.liste_titre div.tagtd { padding: 5px 2px 5px 3px; +} +tr.even td, tr.pair td, tr.odd td, tr.impair td, form.odd div.tagtd, form.impair div.tagtd, form.pair div.tagtd, div.impair div.tagtd, div.pair div.tagtd, div.liste_titre div.tagtd { border-bottom: 1px solid #ddd; } +tr.even:last-child td, tr.pair:last-child td, tr.odd:last-child td, tr.impair:last-child td { + border-bottom: 0px !important; +} tr.even td .nobordernopadding tr td, tr.pair td .nobordernopadding tr td, tr.impair td .nobordernopadding tr td, tr.odd td .nobordernopadding tr td { border-bottom: 0px !important; } @@ -2440,13 +2456,13 @@ input.liste_titre { background: #F0F0F0; } .noborder tr.liste_total td, tr.liste_total td, form.liste_total div { - border-top: 1px solid #DDDDDD; - color: #332266; + color: #552266; font-weight: normal; white-space: nowrap; - padding: 4px; } - +form.liste_total div { + border-top: 1px solid #DDDDDD; +} .tableforservicepart1 .impair, .tableforservicepart1 .pair, .tableforservicepart2 .impair, .tableforservicepart2 .pair { background: #FFF; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f7a0cd54202..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 */ /* ============================================================================== */ @@ -1684,7 +1685,14 @@ span.tabspan { div.divButAction { margin-bottom: 1.4em; } -.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { +span.butAction, span.butActionDelete { + cursor: pointer; +} + + +/* +.butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active +{ text-decoration: none; white-space: nowrap; padding: 0.4em em; @@ -1700,7 +1708,7 @@ div.divButAction { margin-bottom: 1.4em; } border-radius:0px 2px 0px 2px; -moz-box-shadow: 2px 2px 3px #f4f4f4; -webkit-box-shadow: 2px 2px 3px #f4f4f4; - box-shadow: 2px 2px 3px #f4f4f4; + box-shadow: 2px 2px 3px #f4f4f4; } .butAction:hover { @@ -1734,24 +1742,15 @@ div.divButAction { margin-bottom: 1.4em; } -webkit-box-shadow: 3px 3px 4px #f4f4f4; box-shadow: 3px 3px 4px #f4f4f4; } +*/ -global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?> -.butActionRefused { - display: none; -} - - -span.butAction, span.butActionDelete { - cursor: pointer; -} - -/* Prepare for bootstrap look +/* Prepare for bootstrap look */ .butAction, .butActionDelete, .butActionRefused { border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); display: inline-block; - padding: 4px 14px; - margin-bottom: 0; + padding: 0.4em em; + margin: 0em em; line-height: 20px; text-align: center; vertical-align: middle; @@ -1780,7 +1779,7 @@ span.butAction, span.butActionDelete { } .butAction { - color: #ffffff; + color: #ffffff !important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #006dcc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); @@ -1796,7 +1795,7 @@ span.butAction, span.butActionDelete { } .butActionDelete { - color: #ffffff; + color: #ffffff !important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #cc6d00; background-image: -moz-linear-gradient(top, #cc8800, #cc4400); @@ -1813,7 +1812,26 @@ span.butAction, span.butActionDelete { a.butAction:link, a.butAction:visited, a.butAction:hover, a.butAction:active { color: #FFFFFF; } -End bootstrap */ + +.butActionRefused { + color: #AAAAAA !important; + cursor: not-allowed !important; +} + +a.butAction:hover, a.butActionDelete:hover, a.butActionRefused:hover { + text-decoration: none; +} +a.butAction:hover, a.butActionDelete:hover { + opacity: 0.9; +} + +/* End bootstrap */ + +global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?> +.butActionRefused { + display: none; +} +
'; $projectstatic->ref=$objp->ref; print $projectstatic->getNomUrl(1); - print ' - '.dol_trunc($objp->title,24).''; + if ($objp->fk_soc > 0) + { + $thirdpartystatic->id=$objp->fk_soc; + $thirdpartystatic->ref=$objp->socname; + $thirdpartystatic->name=$objp->socname; + print $thirdpartystatic->getNomUrl(1); + } + print ''; @@ -992,7 +1038,25 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= print ''.$objp->nb.''.$objp->nb.''.($plannedworkload?convertSecondToTime($plannedworkload):'').''; + //print $objp->planned_workload.'-'.$objp->declared_progess_workload."
"; + print ($plannedworkload?round(100*$declaredprogressworkload/$plannedworkload,0).'%':''); + print '
'.$projectstatic->getLibStatut(3).'
'.$langs->trans("Total")."
'.$langs->trans("Total")."'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).''.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmount"), 1).''.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).''.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmount"), 1).''.$total_task.''.$total_task.''.($total_plannedworkload?convertSecondToTime($total_plannedworkload):'').''.($total_plannedworkload?round(100*$total_declaredprogressworkload/$total_plannedworkload,0).'%':'').'
'.$tmpyear.'
'.$tmpyear.''.price($trim1).''.price($trim2).''.price($trim3).'
'.$tmpyear.'
'.$tmpyear.''.price($trim1).''.price($trim2).''.price($trim3).'