Package org.openbravo.erpCommon.ad_forms

Examples of org.openbravo.erpCommon.ad_forms.AcctServer


    } else {
      tables = TableIds;
    }
    String strTableDesc;
    for (int i = 0; i < tables.length; i++) {
      final AcctServer acct = AcctServer.get(tables[i], vars.getClient(), strOrg, connection);
      acct.setBatchSize(BATCH_SIZE);
      strTableDesc = AcctServerProcessData.selectDescription(connection, ctx.getLanguage(),
          acct.AD_Table_ID);
      int total = 0;
      while (acct.checkDocuments()) {

        if (total == 0) {
          if (isDirect)
            addLog("@DL_ACCOUNTING@ - " + strTableDesc, false);
          else
            addLog("Accounting - " + strTableDesc, false);
        } else {
          if (isDirect)
            addLog("@DL_COUNTED@ " + total + " - " + strTableDesc, false);
          else
            addLog("Counted " + total + " - " + strTableDesc, false);
        }

        try {
          acct.run(vars);
        } catch (final Exception ex) {
          log4j.error(ex.getMessage(), ex);
          return;
        }

        total += Integer.valueOf(BATCH_SIZE).intValue();
      }
      if (isDirect) {
        addLog("@DL_TABLE@ = " + strTableDesc + " - " + acct.getInfo(ctx.getLanguage()), false);
      } else {
        addLog("Table = " + strTableDesc + " - " + acct.getInfo(ctx.getLanguage()));
      }
      adNoteId = saveLog(adNoteId, vars.getClient());
    }
  }
View Full Code Here


    if (strOrg == null)
      strOrg = "0";

    try {
      con = getTransactionConnection();
      AcctServer acct = AcctServer.get(strTableId, vars.getClient(), strOrg, this.myPool);
   
      if (acct == null) {
        releaseRollbackConnection(con);
        myMessage = Utility.translateError(this, vars, vars.getLanguage(), "ProcessRunError");
        return myMessage;
      } else if (!acct.post(strKey, false, vars, this, con) || acct.errors != 0) { 
        releaseRollbackConnection(con);
        String strStatus = acct.getStatus();    
        // return (Utility.messageBD(this, "ProcessRunError",
        // vars.getLanguage()) + "\\n" + acct.getInfo(vars));
        myMessage = Utility.translateError(this, vars, vars.getLanguage(),
            strStatus.equals("L") ? "@OtherPostingProcessActive@" : "@ProcessRunError@");
        if (strStatus.equals("L"))
View Full Code Here

TOP

Related Classes of org.openbravo.erpCommon.ad_forms.AcctServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.