public void loadPaySelectInfo(int C_PaySelection_ID){
  m_C_BankAccount_ID=-1;
  String sql="SELECT ps.C_BankAccount_ID, b.Name || ' ' || ba.AccountNo," + " c.ISO_Code, CurrentBalance, ba.PaymentExportClass " + "FROM C_PaySelection ps"+ " INNER JOIN C_BankAccount ba ON (ps.C_BankAccount_ID=ba.C_BankAccount_ID)"+ " INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID)"+ " INNER JOIN C_Currency c ON (ba.C_Currency_ID=c.C_Currency_ID) "+ "WHERE ps.C_PaySelection_ID=? AND ps.Processed='Y' AND ba.IsActive='Y'";
  try {
    PreparedStatement pstmt=DB.prepareStatement(sql,null);
    pstmt.setInt(1,C_PaySelection_ID);
    ResultSet rs=pstmt.executeQuery();
    if (rs.next()) {
      m_C_BankAccount_ID=rs.getInt(1);
      bank=rs.getString(2);
      currency=rs.getString(3);
      balance=rs.getBigDecimal(4);
      m_PaymentExportClass=rs.getString(5);
    }
 else {
      m_C_BankAccount_ID=-1;
      bank="";
      currency="";
      balance=Env.ZERO;
      m_PaymentExportClass=null;
      log.log(Level.SEVERE,"No active BankAccount for C_PaySelection_ID=" + C_PaySelection_ID);
    }
    rs.close();
    pstmt.close();
  }
 catch (  SQLException e) {
    log.log(Level.SEVERE,sql,e);
  }
}

public void loadPaySelectInfo ( int C_PaySelection_ID ) { m_C_BankAccount_ID = - 1 ; String sql = "SELECT ps.C_BankAccount_ID, b.Name || ' ' || ba.AccountNo," + " c.ISO_Code, CurrentBalance, ba.PaymentExportClass " + "FROM C_PaySelection ps" + " INNER JOIN C_BankAccount ba ON (ps.C_BankAccount_ID=ba.C_BankAccount_ID)" + " INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID)" + " INNER JOIN C_Currency c ON (ba.C_Currency_ID=c.C_Currency_ID) " + "WHERE ps.C_PaySelection_ID=? AND ps.Processed='Y' AND ba.IsActive='Y'" ; try { PreparedStatement pstmt = DB . prepareStatement ( sql , null ) ; pstmt . setInt ( 1 , C_PaySelection_ID ) ; ResultSet rs = pstmt . executeQuery ( ) ; if ( rs . next ( ) ) { m_C_BankAccount_ID = rs . getInt ( 1 ) ; bank = rs . getString ( 2 ) ; currency = rs . getString ( 3 ) ; balance = rs . getBigDecimal ( 4 ) ; m_PaymentExportClass = rs . getString ( 5 ) ; } else { m_C_BankAccount_ID = - 1 ; bank = "" ; currency = "" ; balance = Env . ZERO ; m_PaymentExportClass = null ; log . log ( Level . SEVERE , "No active BankAccount for C_PaySelection_ID=" + C_PaySelection_ID ) ; } rs . close ( ) ; pstmt . close ( ) ; } catch ( SQLException e ) { log . log ( Level . SEVERE , sql , e ) ; } }
payselect changed - load bank
