remove deprecated libelle
This commit is contained in:
parent
b971aabf3c
commit
061f4623b3
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2005-2008 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2008 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2016 Francis Appels <francis.appels@yahoo.com>
|
* Copyright (C) 2016 Francis Appels <francis.appels@yahoo.com>
|
||||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2019-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -48,7 +48,11 @@ class Entrepot extends CommonObject
|
|||||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'stock';
|
public $picto = 'stock';
|
||||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
|
||||||
|
/**
|
||||||
|
* @var int 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
*/
|
||||||
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Label
|
* @var string Label
|
||||||
@ -184,11 +188,10 @@ class Entrepot extends CommonObject
|
|||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$this->libelle = trim($this->libelle);
|
$this->label = !empty($this->label) ? trim($this->label) : trim($this->libelle);
|
||||||
|
|
||||||
// Si libelle non defini, erreur
|
// Error if label not defined
|
||||||
if ($this->libelle == '')
|
if ($this->label == '') {
|
||||||
{
|
|
||||||
$this->error = "ErrorFieldRequired";
|
$this->error = "ErrorFieldRequired";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -198,7 +201,7 @@ class Entrepot extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (ref, entity, datec, fk_user_author, fk_parent)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (ref, entity, datec, fk_user_author, fk_parent)";
|
||||||
$sql .= " VALUES ('".$this->db->escape($this->libelle)."', ".$conf->entity.", '".$this->db->idate($now)."', ".$user->id.", ".($this->fk_parent > 0 ? $this->fk_parent : "NULL").")";
|
$sql .= " VALUES ('".$this->db->escape($this->label)."', ".$conf->entity.", '".$this->db->idate($now)."', ".$user->id.", ".($this->fk_parent > 0 ? $this->fk_parent : "NULL").")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
@ -285,7 +288,7 @@ class Entrepot extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->libelle = trim($this->libelle);
|
$this->label = !empty($this->label) ? trim($this->label) : trim($this->libelle);
|
||||||
$this->description = trim($this->description);
|
$this->description = trim($this->description);
|
||||||
|
|
||||||
$this->lieu = trim($this->lieu);
|
$this->lieu = trim($this->lieu);
|
||||||
@ -296,7 +299,7 @@ class Entrepot extends CommonObject
|
|||||||
$this->country_id = ($this->country_id > 0 ? $this->country_id : 0);
|
$this->country_id = ($this->country_id > 0 ? $this->country_id : 0);
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."entrepot ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."entrepot ";
|
||||||
$sql .= " SET ref = '".$this->db->escape($this->libelle)."'";
|
$sql .= " SET ref = '".$this->db->escape($this->label)."'";
|
||||||
$sql .= ", fk_parent = ".(($this->fk_parent > 0) ? $this->fk_parent : "NULL");
|
$sql .= ", fk_parent = ".(($this->fk_parent > 0) ? $this->fk_parent : "NULL");
|
||||||
$sql .= ", description = '".$this->db->escape($this->description)."'";
|
$sql .= ", description = '".$this->db->escape($this->description)."'";
|
||||||
$sql .= ", statut = ".$this->statut;
|
$sql .= ", statut = ".$this->statut;
|
||||||
|
|||||||
@ -975,7 +975,6 @@ if ($resql)
|
|||||||
$productlot->sellby = $objp->sellby;
|
$productlot->sellby = $objp->sellby;
|
||||||
|
|
||||||
$warehousestatic->id = $objp->entrepot_id;
|
$warehousestatic->id = $objp->entrepot_id;
|
||||||
$warehousestatic->libelle = $objp->warehouse_ref; // deprecated
|
|
||||||
$warehousestatic->label = $objp->warehouse_ref;
|
$warehousestatic->label = $objp->warehouse_ref;
|
||||||
$warehousestatic->lieu = $objp->lieu;
|
$warehousestatic->lieu = $objp->lieu;
|
||||||
|
|
||||||
|
|||||||
@ -1012,7 +1012,6 @@ if ($resql)
|
|||||||
|
|
||||||
$warehousestatic->id = $objp->entrepot_id;
|
$warehousestatic->id = $objp->entrepot_id;
|
||||||
$warehousestatic->ref = $objp->warehouse_ref;
|
$warehousestatic->ref = $objp->warehouse_ref;
|
||||||
$warehousestatic->libelle = $objp->warehouse_ref; // deprecated
|
|
||||||
$warehousestatic->label = $objp->warehouse_ref;
|
$warehousestatic->label = $objp->warehouse_ref;
|
||||||
$warehousestatic->lieu = $objp->lieu;
|
$warehousestatic->lieu = $objp->lieu;
|
||||||
$warehousestatic->fk_parent = $objp->fk_parent;
|
$warehousestatic->fk_parent = $objp->fk_parent;
|
||||||
|
|||||||
@ -866,7 +866,6 @@ if (!$variants) {
|
|||||||
|
|
||||||
$entrepotstatic->id = $obj->rowid;
|
$entrepotstatic->id = $obj->rowid;
|
||||||
$entrepotstatic->ref = $obj->ref;
|
$entrepotstatic->ref = $obj->ref;
|
||||||
$entrepotstatic->libelle = $obj->ref;
|
|
||||||
$entrepotstatic->label = $obj->ref;
|
$entrepotstatic->label = $obj->ref;
|
||||||
$entrepotstatic->lieu = $obj->lieu;
|
$entrepotstatic->lieu = $obj->lieu;
|
||||||
$entrepotstatic->fk_parent = $obj->fk_parent;
|
$entrepotstatic->fk_parent = $obj->fk_parent;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user