# `Fun_GetLoginUserLanguage` (function) > 获取客户查看权限 - **Type:** FUNCTION - **Returns:** `longtext` - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sLogin_id` | `varchar(255)` | | 2 | IN | `sBr_id` | `varchar(255)` | | 3 | IN | `sSu_id` | `varchar(255)` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_GetLoginUserLanguage`'`._ ## Narrative **Business context:** Login-language resolver. Returns the per-user UI language code (`sLanguage`) for a username-or-id within a `(sBrandsId, sSubsidiaryId)` tenant. Used to localize numeric formatting and field labels in the 采购/生产明细 reports and in receivable/payable summary procs. **What it does:** `SELECT sLanguage INTO p_sReturn FROM sftlogininfo WHERE sBrandsId = … AND sSubsidiaryId = … AND (sUserName = sLogin_id OR sId = sLogin_id) LIMIT 1`. **Invocation:** embedded in form-master sSqlStr for the same five detail forms as `Fun_GetLoginUser` (采购申请明细, 采购订单明细, 生产补料明细, 生产领料明细, 生产退料明细). Also called from `Sp_Calc_sPmt`, `Sp_Calc_sRct`, `Sp_Manufacture_ProductionArrange2`, `Sp_NotReceivables_hz`.