Fix: add civilite_id field in contact when create new third party.

This commit is contained in:
Peter Fontaine 2014-01-19 14:21:11 +01:00
parent 22767bac36
commit 919a7cd4a6
2 changed files with 2 additions and 1 deletions

View File

@ -303,6 +303,7 @@ class Societe extends CommonObject
$contact->name = $this->name_bis;
$contact->firstname = $this->firstname;
$contact->civilite_id = $this->civility_id;
$contact->socid = $this->id; // fk_soc
$contact->statut = 1;
$contact->priv = 0;

View File

@ -118,7 +118,7 @@ if (empty($reshook))
$object->particulier = GETPOST("private");
$object->name = dolGetFirstLastname(GETPOST('firstname'),GETPOST('nom')?GETPOST('nom'):GETPOST('name'));
$object->civilite_id = GETPOST('civilite_id');
$object->civility_id = GETPOST('civilite_id');
// Add non official properties
$object->name_bis = GETPOST('name')?GETPOST('name'):GETPOST('nom');
$object->firstname = GETPOST('firstname');