Update html.formcontract.class.php
bad filtering on contract list (same sql rule as project)
This commit is contained in:
parent
1d21141de2
commit
44f3e64df2
@ -65,7 +65,7 @@ class FormContract
|
|||||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
$sql.= " WHERE c.entity = ".$conf->entity;
|
||||||
//if ($contratListId) $sql.= " AND c.rowid IN (".$contratListId.")";
|
//if ($contratListId) $sql.= " AND c.rowid IN (".$contratListId.")";
|
||||||
if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)";
|
if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)";
|
||||||
else $sql.= " AND c.fk_soc = ".$socid;
|
if ($socid > 0) $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::select_contract", LOG_DEBUG);
|
dol_syslog(get_class($this)."::select_contract", LOG_DEBUG);
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user