Fix get morphy adherent type

This commit is contained in:
ptibogxiv 2019-04-25 09:14:51 +02:00 committed by GitHub
parent 6884999ee3
commit 6190e7813e
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
*/
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)