From 87419cb8ea810c1629fe94c1678e8b7ec60b69c3 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 3 Apr 2007 16:37:09 +0000 Subject: [PATCH] =?UTF-8?q?D=E9but=20ajout=20cr=E9ation=20de=20particulier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/soc.php | 13 +++++++++++-- htdocs/societe.class.php | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/soc.php b/htdocs/soc.php index 0a9740800b8..a948209a094 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -92,8 +92,17 @@ if ($_POST["getsuppliercode"]) if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"]) && ($_POST["action"] == 'add' || $_POST["action"] == 'update') && $user->rights->societe->creer) { - $soc->nom = $_POST["nom"]; - $soc->prenom = $_POST["prenom"]; + if ($_POST["private"] == 1) + { + $soc->nom = $_POST["nom"].' '.$_POST["prenom"]; + $soc->nom_particulier = $_POST["nom"]; + $soc->prenom = $_POST["prenom"]; + $soc->particulier = $_POST["private"]; + } + else + { + $soc->nom = $_POST["nom"]; + } $soc->adresse = $_POST["adresse"]; $soc->cp = $_POST["cp"]; $soc->ville = $_POST["ville"]; diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index ca467683c43..4fa063ef07f 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2003 Brian Fraval * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2005-2007 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by