diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 936c33d6c0c..c310bb18627 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -410,6 +410,21 @@ class AdherentType extends CommonObject return -1; } } + + /** + * Return translated label by the nature of a adherent (physical or moral) + * + * @param string $morphy Nature of the adherent (physical or moral) + * @return string Label + */ + public function getmorphylib($morphy = '') + { + global $langs; + if ($morphy == 'phy') { return $langs->trans("Physical"); } + elseif ($morphy == 'mor') { return $langs->trans("Moral"); } + else return $langs->trans("Physical & Morale"); + //return $morphy; + } /** * Return clicable name (with picto eventually)