Skip to content
Snippets Groups Projects
Commit 3f23b116 authored by Florian Henry's avatar Florian Henry
Browse files

[ bug #1522 ] Liste des propositions commerciales non filtée depuis un

projet
parent 0598bb61
No related branches found
No related tags found
No related merge requests found
...@@ -164,9 +164,10 @@ class FormProjets ...@@ -164,9 +164,10 @@ class FormProjets
* Build Select List of element associable to a project * Build Select List of element associable to a project
* *
* @param string $table_element Table of the element to update * @param string $table_element Table of the element to update
* @param int $socid socid to filter
* @return string The HTML select list of element * @return string The HTML select list of element
*/ */
function select_element($table_element) function select_element($table_element,$socid=0)
{ {
global $conf; global $conf;
...@@ -193,8 +194,8 @@ class FormProjets ...@@ -193,8 +194,8 @@ class FormProjets
$sql.= " FROM ".MAIN_DB_PREFIX.$table_element; $sql.= " FROM ".MAIN_DB_PREFIX.$table_element;
$sql.= " WHERE ".$projectkey." is null"; $sql.= " WHERE ".$projectkey." is null";
if (!empty($this->societe->id)) { if (!empty($socid)) {
$sql.= " AND fk_soc=".$this->societe->id; $sql.= " AND fk_soc=".$socid;
} }
$sql.= ' AND entity='.getEntity('project'); $sql.= ' AND entity='.getEntity('project');
$sql.= " ORDER BY ref DESC"; $sql.= " ORDER BY ref DESC";
......
...@@ -216,7 +216,7 @@ foreach ($listofreferent as $key => $value) ...@@ -216,7 +216,7 @@ foreach ($listofreferent as $key => $value)
print_titre($langs->trans($title)); print_titre($langs->trans($title));
$selectList=$formproject->select_element($tablename); $selectList=$formproject->select_element($tablename,$project->societe->id);
if ($selectList<0) { if ($selectList<0) {
setEventMessage($formproject->error,'errors'); setEventMessage($formproject->error,'errors');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment