From d7d353aed1b6acbbbd1cc1e670c8e8deb67a0894 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 13 Oct 2010 17:18:10 +0000 Subject: [PATCH] Fix: bad type if change country --- htdocs/societe/soc.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index bf983c84c3e..951ddf69229 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -559,11 +559,11 @@ else * Company Fact creation mode */ //if ($_GET["type"]=='cp') { $soc->client=3; } - if ($_GET["type"]!='f') $soc->client=3; - if ($_GET["type"]=='c') { $soc->client=1; } - if ($_GET["type"]=='p') { $soc->client=2; } - if ($conf->fournisseur->enabled && ($_GET["type"]=='f' || $_GET["type"]=='')) { $soc->fournisseur=1; } - if ($_REQUEST["private"]==1) { $soc->particulier=1; } + if (GETPOST("type")!='f') $soc->client=3; + if (GETPOST("type")=='c') { $soc->client=1; } + if (GETPOST("type")=='p') { $soc->client=2; } + if ($conf->fournisseur->enabled && (GETPOST("type")=='f' || GETPOST("type")=='')) { $soc->fournisseur=1; } + if (GETPOST("private")==1) { $soc->particulier=1; } $soc->nom=$_POST["nom"]; $soc->prenom=$_POST["prenom"]; @@ -673,6 +673,7 @@ else print ''; print ''; print ''; + print ''; if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) print ''; print '';