Delimiter //
/**
 * Author:  armen
 * Created: 26 févr. 2020
 * renvoi le code langue de l'adminparam
 */

drop function if exists CASH_BUSINESS_GET_ADMINPARAM_LANGUAGE_CODE //
Create Function CASH_BUSINESS_GET_ADMINPARAM_LANGUAGE_CODE(
		idadminparam int unsigned
	)
	returns char(5)
Begin
	return (
            Select
                dfl.DF_LANGUAGES_CODE
            From ADMIN_PARAMS adm
                Inner Join DF_LANGUAGES dfl
                    On adm.DF_LANGUAGES_ID_DEF_LANGUAGE = dfl.ID_DF_LANGUAGES
            where
                adm.ID_ADMIN_PARAMS = idadminparam
		)
	;
End //
Delimiter ;