new : select2 for contract selector
This commit is contained in:
parent
60a54041c2
commit
a1c1aa054f
@ -66,6 +66,7 @@ class FormContract
|
|||||||
//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)";
|
||||||
if ($socid > 0) $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
|
if ($socid > 0) $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
|
||||||
|
$sql.= " ORDER BY c.ref ";
|
||||||
|
|
||||||
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);
|
||||||
@ -129,6 +130,11 @@ class FormContract
|
|||||||
}
|
}
|
||||||
print '</select>';
|
print '</select>';
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
|
// Make select dynamic
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||||
|
print ajax_combobox($htmlname);
|
||||||
|
|
||||||
return $num;
|
return $num;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user