From f7d70d35a7931f1be738df308008f3a9878deca7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Dec 2011 21:50:25 +0100 Subject: [PATCH] Fix: code is not set during update if not needed --- htdocs/societe/class/societe.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 69a1acdffa3..a944721e9f1 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -515,7 +515,7 @@ class Societe extends CommonObject $sql .= ",default_lang = ".($this->default_lang?"'".$this->default_lang."'":"null"); $sql .= ",logo = ".($this->logo?"'".$this->logo."'":"null"); - if ($allowmodcodeclient) + if ($allowmodcodeclient && $this->client) { //$this->check_codeclient(); @@ -527,7 +527,7 @@ class Societe extends CommonObject $sql .= ", code_compta = ".($this->code_compta?"'".$this->db->escape($this->code_compta)."'":"null"); } - if ($allowmodcodefournisseur) + if ($allowmodcodefournisseur && $this->fournisseur) { //$this->check_codefournisseur();