From 6190e7813e6a435fe68f074ffd68b3ac1272103d Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 25 Apr 2019 09:14:51 +0200 Subject: [PATCH] Fix get morphy adherent type --- htdocs/adherents/class/adherent_type.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 936c33d6c0c..9c7d34ed569 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 + */ + 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)