• Function : Ledger account name


    AOT - > Classes - > Global - > LedgerName(...)

    get some of ledger Account name which account's level

    Remark by Jimmy August 31th 2010

    /**
    get some of ledger Account name which account's level
    This function is through  ledger account,so that  which is derived the name of accounts
    Jimmy August 31th in 2010
    */
    Static str 500 LedgerName(LedgerAccount   _LedgerAccount,
                              boolean         isChineseTxt = false,
                              str 10          flag = "")
    {
        str  500            Level2;
        int                 i,len = Strlen(strlrtrim(_LedgerAccount));
    
    str 200 ChineseTxt(str 500  _Level2)
    {
        str 500     st,subst;
    ;
        if(isChineseTxt)
        {
            len = strlen(_Level2);
            for(i = 1; i <= len; i ++)
            {
                subst = substr(_Level2,i,1);
                if(!global::isEnglishChar(subst))
                {
                    if(!st)
                        st = subst;
                    else
                        st += subst;
                }
            }
            _Level2 = st;
        }
        return strlrtrim(_Level2);
    }
    ;
        if(global::isInteger(_LedgerAccount))
        {
            if(len == 4)  //Two level subjects
            {
                Level2 = LedgerTable::find(_LedgerAccount).AccountNameAlias;
            }
            if(len == 6) //Two level subjects
            {
                Level2 = LedgerTable::find(substr(strlrtrim(_LedgerAccount),1,4)).AccountNameAlias;
                if(isChineseTxt)
                    Level2 = ChineseTxt(Level2);
                Level2 += ' - ' + LedgerTable::find(_LedgerAccount).AccountNameAlias;
    
            }
            if(len == 8) //Three level subjects
            {
                Level2 = LedgerTable::find(substr(strlrtrim(_LedgerAccount),1,4)).AccountNameAlias;
                if(isChineseTxt)
                    Level2 = ChineseTxt(Level2);
                Level2 += ' - ' + LedgerTable::find(substr(strlrtrim(_LedgerAccount),1,6)).AccountNameAlias;
                if(isChineseTxt)
                    Level2 = ChineseTxt(Level2);
                Level2 += ' - ' + LedgerTable::find(_LedgerAccount).AccountNameAlias;
            }
        }
    
        if(flag)
            return _LedgerAccount + flag + Level2;
        else
            return _LedgerAccount + '   ' + Level2;
    
    }
    

  • 相关阅读:
    判断一个对象是否为空
    viewflipper的高度设置
    Android利用ViewFlipper实现屏幕切换动画效果
    锁屏状态下点亮屏幕,并弹出闹钟提示信息
    android如何取消闹铃
    luogu P1880(区间dp)
    luogu P2014 选课(树形dp)
    luogu P1122(树形dp)
    luogu P1352 (树形dp)
    luogu P1541 (dp)
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1813817.html
Copyright © 2020-2023  润新知