notfound second and third Account Schema v253

franceerp
2005-10-29
2013-05-02
  • franceerp
    franceerp
    2005-10-29

    Hello

    Im working with 2 accounting schema : version 252 e.
    I dont know how to activate the second accounting schema in 253 version.
    It was possible in Client Window : Tab Information.
    Is this function concelled or not activated?
    Thanks

     
    • albert
      albert
      2005-10-31

      //2.5.2e-------------------------------------------------------------------------------
          public static MAcctSchema[] getClientAcctSchema (Properties ctx, int AD_Client_ID)
          {
              //  Check Cache
              Integer key = new Integer(AD_Client_ID);
              if (s_schema.containsKey(key))
                  return (MAcctSchema[])s_schema.get(key);

              //  Create New
              ArrayList list = new ArrayList();
              String sql = "SELECT C_AcctSchema1_ID,"
                      + "Acct2_Active,C_AcctSchema2_ID,"
                      + "Acct3_Active,C_AcctSchema3_ID "
                  + "FROM AD_ClientInfo ";
              if (AD_Client_ID != 0)
                  sql += "WHERE AD_Client_ID=?";
      //2.5.3a----------------------------------------------------------------------------------------------
          public static MAcctSchema[] getClientAcctSchema (Properties ctx, int AD_Client_ID, String trxName)
          {
              //  Check Cache
              Integer key = new Integer(AD_Client_ID);
              if (s_schema.containsKey(key))
                  return (MAcctSchema[])s_schema.get(key);

              //  Create New
              ArrayList<MAcctSchema> list = new ArrayList<MAcctSchema>();
              MClientInfo info = MClientInfo.get(ctx, AD_Client_ID, trxName);
              MAcctSchema as = MAcctSchema.get (ctx, info.getC_AcctSchema1_ID(), trxName);
              if (as.get_ID() != 0 && trxName == null)
                  list.add(as);
              //    Other
              String sql = "SELECT C_AcctSchema_ID FROM C_AcctSchema acs "
                  + "WHERE IsActive='Y'"
                  + " AND EXISTS (SELECT * FROM C_AcctSchema_GL gl WHERE acs.C_AcctSchema_ID=gl.C_AcctSchema_ID)"
                  + " AND EXISTS (SELECT * FROM C_AcctSchema_Default d WHERE acs.C_AcctSchema_ID=d.C_AcctSchema_ID)";
              if (AD_Client_ID != 0)
                  sql += " AND AD_Client_ID=?";
              sql += " ORDER BY C_AcctSchema_ID";
      -------------------------------------------
      //New version the C_AcctSchema1_ID, Acct2_Active,C_AcctSchema2_ID, Acct3_Active,C_AcctSchema3_ID was disappear

       
    • Kathy Pink
      Kathy Pink
      2005-10-31

      you just enter it.  There is now no second, third accounting schemas just a primary one.

       
    • albert
      albert
      2005-11-01

      Thanks Kathy Pink , New version is a really nice Structure multiply Accounting Schema Not 3 only, can be unlimited as many as you want..........