Fix: sql error on numbering module for tasks

This commit is contained in:
Laurent Destailleur
2014-02-28 21:40:08 +01:00
parent 74404749c6
commit 68a508a0d1

View File

@@ -739,7 +739,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
$sql.= " FROM ".MAIN_DB_PREFIX.$table;
$sql.= " WHERE ".$field." LIKE '".$maskLike."'";
$sql.= " AND ".$field." NOT LIKE '%PROV%'";
$sql.= " AND entity IN (".getEntity($table, 1).")";
if ($table != 'projet_task') $sql.= " AND entity IN (".getEntity($table, 1).")";
if ($where) $sql.=$where;
if ($sqlwhere) $sql.=' AND '.$sqlwhere;