Dbut ajout cration de particulier

This commit is contained in:
Regis Houssin 2007-04-03 16:37:09 +00:00
parent 3218492cc7
commit 87419cb8ea
2 changed files with 12 additions and 2 deletions

View File

@ -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"];

View File

@ -4,6 +4,7 @@
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2003 Brian Fraval <brian@fraval.org>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@cap-networks.com>
*
* 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