From 919a7cd4a616371aa31d141ba4022e098c478fde Mon Sep 17 00:00:00 2001 From: Peter Fontaine Date: Sun, 19 Jan 2014 14:21:11 +0100 Subject: [PATCH] Fix: add civilite_id field in contact when create new third party. --- htdocs/societe/class/societe.class.php | 1 + htdocs/societe/soc.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 941a5445ff1..4f00cef5f9f 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -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; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 5e1a6ed40d7..5b1cca98c77 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -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');