zoukankan      html  css  js  c++  java
  • 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;
    
    }
    

  • 相关阅读:
    L378 Scientifically, this is the best age for you to lead
    L376 Unleashing Your True Potential
    L375 爱情和事业平衡
    L374 企鹅
    2019-05-12 L373 英国要被淹
    2019-05-10 Business Meeting-Meeting Notice
    子类能不能继承父类的成员变量
    Java 重写(Override)与重载(Overload)
    java 类访问权限
    IS-A 和 HAS-A
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1813817.html
Copyright © 2011-2022 走看看