public void findChargeElementID(){
  m_C_AcctSchema_ID=Env.getContextAsInt(Env.getCtx(),"$C_AcctSchema_ID");
  String sql="SELECT C_Element_ID " + "FROM C_AcctSchema_Element " + "WHERE ElementType='AC' AND C_AcctSchema_ID=?";
  try {
    PreparedStatement pstmt=DB.prepareStatement(sql,null);
    pstmt.setInt(1,m_C_AcctSchema_ID);
    ResultSet rs=pstmt.executeQuery();
    if (rs.next()) {
      m_C_Element_ID=rs.getInt(1);
    }
    rs.close();
    pstmt.close();
  }
 catch (  SQLException exception) {
    log.log(Level.SEVERE,sql,exception);
  }
}

public void findChargeElementID ( ) { m_C_AcctSchema_ID = Env . getContextAsInt ( Env . getCtx ( ) , "$C_AcctSchema_ID" ) ; String sql = "SELECT C_Element_ID " + "FROM C_AcctSchema_Element " + "WHERE ElementType='AC' AND C_AcctSchema_ID=?" ; try { PreparedStatement pstmt = DB . prepareStatement ( sql , null ) ; pstmt . setInt ( 1 , m_C_AcctSchema_ID ) ; ResultSet rs = pstmt . executeQuery ( ) ; if ( rs . next ( ) ) { m_C_Element_ID = rs . getInt ( 1 ) ; } rs . close ( ) ; pstmt . close ( ) ; } catch ( SQLException exception ) { log . log ( Level . SEVERE , sql , exception ) ; } }
finds the element identifier for the current charge .
