New: early development of multi-company module
This commit is contained in:
parent
6a9a9ff040
commit
974a10e1cc
@ -68,7 +68,8 @@ if (!$user->rights->societe->client->voir && !$socid)
|
|||||||
$clause = " AND ";
|
$clause = " AND ";
|
||||||
}
|
}
|
||||||
$sql.= $clause." e.fk_statut = 0";
|
$sql.= $clause." e.fk_statut = 0";
|
||||||
$sql.= " AND e.entity = ".$conf->entity;
|
$sql.= " AND (e.entity = ".$conf->entity;
|
||||||
|
$sql.= " AND s.entity = ".$conf->entity.")";
|
||||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
|
|||||||
@ -87,7 +87,6 @@ class Livraison extends CommonObject
|
|||||||
$this->brouillon = 1;
|
$this->brouillon = 1;
|
||||||
|
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
if ($this->expedition_id) $expedition_id
|
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
@ -117,8 +116,9 @@ class Livraison extends CommonObject
|
|||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."livraison");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."livraison");
|
||||||
|
|
||||||
$numref = "(PROV".$this->id.")";
|
$numref = "(PROV".$this->id.")";
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."livraison ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."livraison ";
|
||||||
$sql.= "SET ref = '".addslashes($numref);
|
$sql.= "SET ref = '".addslashes($numref)."'";
|
||||||
$sql.= " WHERE rowid = ".$this->id;
|
$sql.= " WHERE rowid = ".$this->id;
|
||||||
|
|
||||||
dol_syslog("Livraison::create sql=".$sql, LOG_DEBUG);
|
dol_syslog("Livraison::create sql=".$sql, LOG_DEBUG);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user