Skip to content
Snippets Groups Projects
Commit b4ef7802 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: When project was disabled, label was not visible

parent 1ba02185
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ class FormProjets
$sql.= " WHERE p.entity = ".$conf->entity;
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
$sql.= " ORDER BY p.title ASC";
$sql.= " ORDER BY p.ref ASC";
dol_syslog(get_class($this)."::select_projects sql=".$sql,LOG_DEBUG);
$resql=$this->db->query($sql);
......@@ -113,6 +113,7 @@ class FormProjets
else
{
$disabled=0;
$labeltoshow.=' '.dol_trunc($obj->title,$maxlength);
if (! $obj->fk_statut > 0)
{
$disabled=1;
......@@ -134,8 +135,8 @@ class FormProjets
if ($disabled) $resultat.=' disabled="disabled"';
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("Public").')';
//else $labeltoshow.=' ('.$langs->trans("Private").')';
$resultat.='>'.$labeltoshow;
if (! $disabled) $resultat.=' - '.dol_trunc($obj->title,$maxlength);
$resultat.='>';
$resultat.=$labeltoshow;
$resultat.='</option>';
}
$out.= $resultat;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment