Removed deprecated code
This commit is contained in:
parent
a67c00ee7a
commit
360dd71c58
@ -71,9 +71,9 @@ class Livraison extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Cr<EFBFBD><EFBFBD> bon de livraison en base
|
* \brief Create delivery receipt in database
|
||||||
* \param user Objet du user qui cr<EFBFBD>e
|
* \param user Objet du user qui cree
|
||||||
* \return int <0 si erreur, id livraison cr<EFBFBD><EFBFBD>e si ok
|
* \return int <0 si erreur, id livraison cree si ok
|
||||||
*/
|
*/
|
||||||
function create($user)
|
function create($user)
|
||||||
{
|
{
|
||||||
@ -92,12 +92,10 @@ class Livraison extends CommonObject
|
|||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."livraison (ref, fk_soc, date_creation, fk_user_author,";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."livraison (ref, fk_soc, date_creation, fk_user_author,";
|
||||||
$sql.= " fk_adresse_livraison";
|
$sql.= " fk_adresse_livraison";
|
||||||
if ($this->commande_id) $sql.= ", fk_commande";
|
|
||||||
if ($this->expedition_id) $sql.= ", fk_expedition";
|
if ($this->expedition_id) $sql.= ", fk_expedition";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
$sql.= " VALUES ('(PROV)', ".$this->socid.", now(), $user->id,";
|
$sql.= " VALUES ('(PROV)', ".$this->socid.", now(), $user->id,";
|
||||||
$sql.= " ".($this->adresse_livraison_id > 0?$this->adresse_livraison_id:"null");
|
$sql.= " ".($this->adresse_livraison_id > 0?$this->adresse_livraison_id:"null");
|
||||||
if ($this->commande_id) $sql.= ", $this->commande_id";
|
|
||||||
if ($this->expedition_id) $sql.= ", $this->expedition_id";
|
if ($this->expedition_id) $sql.= ", $this->expedition_id";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
|
|
||||||
@ -134,6 +132,18 @@ class Livraison extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if ($conf->livraison->enabled && $this->origin_id)
|
||||||
|
{
|
||||||
|
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'co_liv (fk_livraison, fk_commande) VALUES ('.$this->id.','.$this->origin_id.')';
|
||||||
|
if (!$this->db->query($sql))
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (! $conf->expedition->enabled)
|
if (! $conf->expedition->enabled)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user