Fix: Civility field must be blank if not defined.
This commit is contained in:
parent
0ec4b3bcdb
commit
1223d7c3d0
@ -1500,11 +1500,12 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function getCivilityLabel()
|
function getCivilityLabel()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("dict");
|
$langs->load("dict");
|
||||||
|
|
||||||
$code=$this->civilite_id;
|
$code=(! empty($this->civilite_id)?$this->civilite_id:(! empty($this->civility_id)?$this->civility_id:''));
|
||||||
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code);
|
if (empty($code)) return '';
|
||||||
|
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user