Merge pull request #1384 from Pfontaine/fix/societe2contact_civilite
Fix: add civilite_id field in contact when create new third party.
This commit is contained in:
commit
8bd2a1bc32
@ -303,6 +303,7 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
$contact->name = $this->name_bis;
|
$contact->name = $this->name_bis;
|
||||||
$contact->firstname = $this->firstname;
|
$contact->firstname = $this->firstname;
|
||||||
|
$contact->civilite_id = $this->civility_id;
|
||||||
$contact->socid = $this->id; // fk_soc
|
$contact->socid = $this->id; // fk_soc
|
||||||
$contact->statut = 1;
|
$contact->statut = 1;
|
||||||
$contact->priv = 0;
|
$contact->priv = 0;
|
||||||
|
|||||||
@ -118,7 +118,7 @@ if (empty($reshook))
|
|||||||
$object->particulier = GETPOST("private");
|
$object->particulier = GETPOST("private");
|
||||||
|
|
||||||
$object->name = dolGetFirstLastname(GETPOST('firstname'),GETPOST('nom')?GETPOST('nom'):GETPOST('name'));
|
$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
|
// Add non official properties
|
||||||
$object->name_bis = GETPOST('name')?GETPOST('name'):GETPOST('nom');
|
$object->name_bis = GETPOST('name')?GETPOST('name'):GETPOST('nom');
|
||||||
$object->firstname = GETPOST('firstname');
|
$object->firstname = GETPOST('firstname');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user