forked from Wavyzz/dolibarr
Multi-company compatibility with transverse mode for pdf models
This commit is contained in:
@@ -1250,7 +1250,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
|||||||
$sql = "SELECT nom as id, nom as lib, libelle as label, description as description";
|
$sql = "SELECT nom as id, nom as lib, libelle as label, description as description";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
|
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
$sql.= " WHERE type = '".$type."'";
|
$sql.= " WHERE type = '".$type."'";
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
Reference in New Issue
Block a user