From afd631e6e3aa2d36b5af62fc30b0ac6e9d5a9321 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?=
 <marcosgdf@gmail.com>
Date: Sun, 14 Sep 2014 13:22:05 +0200
Subject: [PATCH] [ bug #1577 ] When creating new Private individual third,
 selected third type is ignored

---
 ChangeLog              | 1 +
 htdocs/societe/soc.php | 9 +--------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 04e63ec1c8e..878a1dcfa4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,7 @@ Fix: [ bug #1544 ] Can remove date from invoice.
 Fix: list event view lost type event filter.
 Fix: Add code save on create event.
 Fix: SQL injection.
+Fix: [ bug #1577 ] When creating new Private individual third, selected third type is ignored
 
 ***** ChangeLog for 3.5.4 compared to 3.5.3 *****
 Fix: Hide title of event when agenda module disabled.
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 0e2e58f73e8..b24179328fc 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -159,14 +159,7 @@ if (empty($reshook))
 
         $object->forme_juridique_code  = GETPOST('forme_juridique_code');
         $object->effectif_id           = GETPOST('effectif_id');
-        if (GETPOST("private") == 1)
-        {
-            $object->typent_id         = dol_getIdFromCode($db,'TE_PRIVATE','c_typent');
-        }
-        else
-        {
-            $object->typent_id         = GETPOST('typent_id');
-        }
+        $object->typent_id         = GETPOST('typent_id');
 
         $object->client                = GETPOST('client');
         $object->fournisseur           = GETPOST('fournisseur');
-- 
GitLab