src/org/openbravo/erpCommon/ad_callouts/SL_AdvPayment_Document.java
author RM packaging bot <staff.rm@openbravo.com>
Tue, 28 Jun 2011 10:33:23 +0000
changeset 9542 845811ab032b
parent 6915 9d3c0c59bb55
permissions -rw-r--r--
Update AD_MODULE version to 2.50MP31
package org.openbravo.erpCommon.ad_callouts;

import javax.servlet.ServletException;

import org.openbravo.base.filter.IsIDFilter;
import org.openbravo.base.filter.RegexFilter;
import org.openbravo.base.secureApp.VariablesSecureApp;
import org.openbravo.erpCommon.utility.Utility;

public class SL_AdvPayment_Document extends SimpleCallout {

  private static final long serialVersionUID = 1L;

  @Override
  protected void execute(CalloutInfo info) throws ServletException {
    VariablesSecureApp vars = info.vars;
    String strWindowNo = info.getWindowId();
    String strTableNameId = info.getStringParameter("inpkeyColumnId", new RegexFilter(
        "[a-zA-Z0-9_]*_ID"));
    String strDocType_Id = info.getStringParameter("inpcDoctypeId", IsIDFilter.instance);
    String strTableName = strTableNameId.substring(0, strTableNameId.length() - 3);
    String strDocumentNo = Utility.getDocumentNo(this, vars, strWindowNo, strTableName,
        strDocType_Id, strDocType_Id, false, false);
    info.addResult("inpdocumentno", "<" + strDocumentNo + ">");
  }

}