Skip to content
Snippets Groups Projects
Commit 7dd8eba2 authored by Maxime Kohlhaas's avatar Maxime Kohlhaas
Browse files

New contact gender according to civility

parent 2d558174
No related branches found
No related tags found
No related merge requests found
......@@ -593,8 +593,15 @@ class Contact extends CommonObject
$this->canvas = $obj->canvas;
$this->import_key = $obj->import_key;
// Define gender according to civility
if(in_array($this->civility_id, array('MR'))) {
$this->gender = 'man';
} else if(in_array($this->civility_id, array('MME','MLE'))) {
$this->gender = 'woman';
}
// Recherche le user Dolibarr lie a ce contact
// Search Dolibarr user linked to this contact
$sql = "SELECT u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " WHERE u.fk_socpeople = ". $this->id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment