Merge pull request #11067 from ptibogxiv/patch-154

Fix get morphy adherent type
This commit is contained in:
Laurent Destailleur 2019-04-25 11:17:29 +02:00 committed by GitHub
commit 7fe28d6c5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)