Fix link element from project "associates object" pages

http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/50687-objet-associes-au-projet
This commit is contained in:
Florian HENRY
2014-06-13 15:54:37 +02:00
parent aecede08c4
commit 0916d2cf3b
3 changed files with 13 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ Fix: Filter on status was not visible when selected from url.
Fix: Filtering on status was last when asking to sort.
Fix: [ bug #1454 ] Mention de bas de page erroné
Fix: Do not display dictionnay for non activated module
Fix: Link element from element project pages
***** ChangeLog for 3.5.3 compared to 3.5.2 *****
Fix: Error on field accountancy code for export profile of invoices.

View File

@@ -168,6 +168,7 @@ class FormProjets
*/
function select_element($table_element)
{
global $conf;
$projectkey="fk_projet";
switch ($table_element)
@@ -195,7 +196,7 @@ class FormProjets
if (!empty($this->societe->id)) {
$sql.= " AND fk_soc=".$this->societe->id;
}
$sql.= ' AND entity='.$conf->entity;
$sql.= ' AND entity='.getEntity('project');
$sql.= " ORDER BY ref DESC";
dol_syslog(get_class($this).'::select_element sql='.$sql,LOG_DEBUG);
@@ -219,6 +220,10 @@ class FormProjets
return $sellist ;
$this->db->free($resql);
}else {
$this->error=$this->db->lasterror();
dol_syslog(get_class($this) . "::select_element " . $errmsg, LOG_ERR);
return -1;
}
}

View File

@@ -209,6 +209,7 @@ foreach ($listofreferent as $key => $value)
$classname=$value['class'];
$tablename=$value['table'];
$qualified=$value['test'];
if ($qualified)
{
print '<br>';
@@ -216,6 +217,10 @@ foreach ($listofreferent as $key => $value)
print_titre($langs->trans($title));
$selectList=$formproject->select_element($tablename);
if ($selectList<0) {
setEventMessage($formproject->error,'errors');
}
if ($selectList)
{
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$projectid.'" method="post">';