Fix: code is not set during update if not needed
This commit is contained in:
parent
c4ef463b11
commit
b93aa1e892
@ -499,7 +499,7 @@ class Societe extends CommonObject
|
|||||||
$sql .= ",default_lang = ".($this->default_lang?"'".$this->default_lang."'":"null");
|
$sql .= ",default_lang = ".($this->default_lang?"'".$this->default_lang."'":"null");
|
||||||
$sql .= ",logo = ".($this->logo?"'".$this->logo."'":"null");
|
$sql .= ",logo = ".($this->logo?"'".$this->logo."'":"null");
|
||||||
|
|
||||||
if ($allowmodcodeclient)
|
if ($allowmodcodeclient && $this->client)
|
||||||
{
|
{
|
||||||
//$this->check_codeclient();
|
//$this->check_codeclient();
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ class Societe extends CommonObject
|
|||||||
$sql .= ", code_compta = ".($this->code_compta?"'".$this->db->escape($this->code_compta)."'":"null");
|
$sql .= ", code_compta = ".($this->code_compta?"'".$this->db->escape($this->code_compta)."'":"null");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($allowmodcodefournisseur)
|
if ($allowmodcodefournisseur && $this->fournisseur)
|
||||||
{
|
{
|
||||||
//$this->check_codefournisseur();
|
//$this->check_codefournisseur();
|
||||||
|
|
||||||
@ -1330,7 +1330,7 @@ class Societe extends CommonObject
|
|||||||
if ($this->id)
|
if ($this->id)
|
||||||
{
|
{
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."societe ";
|
||||||
$sql .= " SET price_level = '".$price_level."'";
|
$sql .= " SET price_level = '".$price_level."'";
|
||||||
$sql .= " WHERE rowid = " . $this->id;
|
$sql .= " WHERE rowid = " . $this->id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user