From cc698e6ed0fcabe1a1e1422202ce9f86bf6ca153 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Jun 2008 17:02:13 +0000 Subject: [PATCH] Fix: Bad default value --- htdocs/societe.class.php | 4 ++-- mysql/migration/2.2.0-2.4.0.sql | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 5c9c13e7efa..a514fff288e 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -293,7 +293,7 @@ class Societe extends CommonObject } /** - * \brief Mise a jour des param�tres de la soci�t� + * \brief Update parameters of third party * \param id id societe * \param user Utilisateur qui demande la mise � jour * \param call_trigger 0=non, 1=oui @@ -381,7 +381,7 @@ class Societe extends CommonObject $sql .= ",fk_effectif = ".($this->effectif_id?"'".$this->effectif_id."'":"null"); - $sql .= ",fk_typent = ".($this->typent_id?"'".$this->typent_id."'":"null"); + $sql .= ",fk_typent = ".($this->typent_id?"'".$this->typent_id."'":"0"); $sql .= ",fk_forme_juridique = ".($this->forme_juridique_code?"'".$this->forme_juridique_code."'":"null"); diff --git a/mysql/migration/2.2.0-2.4.0.sql b/mysql/migration/2.2.0-2.4.0.sql index ce5d856f388..f87e2c6c14d 100644 --- a/mysql/migration/2.2.0-2.4.0.sql +++ b/mysql/migration/2.2.0-2.4.0.sql @@ -333,3 +333,6 @@ drop table llx_comfourn_facfourn; alter table llx_element_element modify sourcetype varchar(16) NOT NULL; alter table llx_element_element modify targettype varchar(16) NOT NULL; + +update llx_societe set fk_typent = 0 where fk_typent is null; +