Début ajout création de particulier
This commit is contained in:
parent
2b33ca8047
commit
3218492cc7
@ -44,6 +44,9 @@ class Societe
|
|||||||
|
|
||||||
var $id;
|
var $id;
|
||||||
var $nom;
|
var $nom;
|
||||||
|
var $nom_particulier;
|
||||||
|
var $prenom;
|
||||||
|
var $particulier;
|
||||||
var $adresse;
|
var $adresse;
|
||||||
var $cp;
|
var $cp;
|
||||||
var $ville;
|
var $ville;
|
||||||
@ -55,7 +58,7 @@ class Societe
|
|||||||
var $email;
|
var $email;
|
||||||
var $url;
|
var $url;
|
||||||
|
|
||||||
// 4 identifiants porfessionnels (leur utilisation depend du pays)
|
// 4 identifiants professionnels (leur utilisation depend du pays)
|
||||||
var $siren; // IdProf1
|
var $siren; // IdProf1
|
||||||
var $siret; // IdProf2
|
var $siret; // IdProf2
|
||||||
var $ape; // IdProf3
|
var $ape; // IdProf3
|
||||||
@ -405,6 +408,31 @@ class Societe
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//Si c'est un particulier on crée la fiche contact
|
||||||
|
if ($this->particulier == 1)
|
||||||
|
{
|
||||||
|
require_once (DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||||
|
$contact = new Contact($this->db);
|
||||||
|
|
||||||
|
$contact->socid = $id;
|
||||||
|
$contact->name = $this->nom_particulier;
|
||||||
|
$contact->firstname = $this->prenom;
|
||||||
|
//$contact->civilite_id = $_POST["civilite_id"];
|
||||||
|
//$contact->poste = $_POST["poste"];
|
||||||
|
$contact->address = $this->adresse;
|
||||||
|
$contact->cp = $this->cp;
|
||||||
|
$contact->ville = $this->ville;
|
||||||
|
$contact->fk_pays = $this->pays_id;
|
||||||
|
$contact->email = $this->email;
|
||||||
|
$contact->phone_pro = $this->tel;
|
||||||
|
//$contact->phone_perso = $_POST["phone_perso"];
|
||||||
|
//$contact->phone_mobile = $_POST["phone_mobile"];
|
||||||
|
$contact->fax = $this->fax;
|
||||||
|
|
||||||
|
$id = $contact->create($user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// si le fournisseur est classe on l'ajoute
|
// si le fournisseur est classe on l'ajoute
|
||||||
$this->AddFournisseurInCategory($this->fournisseur_categorie);
|
$this->AddFournisseurInCategory($this->fournisseur_categorie);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user