Fix status disabled of task intocombo list
This commit is contained in:
parent
925f240340
commit
047d6f78e7
@ -368,6 +368,7 @@ class FormProjets
|
|||||||
} else $out .= ' ';
|
} else $out .= ' ';
|
||||||
$out .= '</option>';
|
$out .= '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num)
|
if ($num)
|
||||||
@ -388,6 +389,18 @@ class FormProjets
|
|||||||
|
|
||||||
$labeltoshow = '';
|
$labeltoshow = '';
|
||||||
|
|
||||||
|
$disabled = 0;
|
||||||
|
if ($obj->fk_statut == Project::STATUS_DRAFT)
|
||||||
|
{
|
||||||
|
$disabled = 1;
|
||||||
|
} elseif ($obj->fk_statut == Project::STATUS_CLOSED)
|
||||||
|
{
|
||||||
|
if ($discard_closed == 2) $disabled = 1;
|
||||||
|
} elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid))
|
||||||
|
{
|
||||||
|
$disabled = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if ($showproject == 'all')
|
if ($showproject == 'all')
|
||||||
{
|
{
|
||||||
$labeltoshow .= dol_trunc($obj->ref, 18); // Project ref
|
$labeltoshow .= dol_trunc($obj->ref, 18); // Project ref
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user