+ " ORDER BY M_PriceList_Version.Name";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pickPriceList.addItem(new KeyNamePair (0, ""));
pstmt = DB.prepareStatement(SQL, null);
rs = pstmt.executeQuery();
while (rs.next())
{
KeyNamePair kn = new KeyNamePair (rs.getInt(1), rs.getString(2));
pickPriceList.addItem(kn);
}
DB.close(rs, pstmt);
// Warehouse
SQL = MRole.getDefault().addAccessSQL (
"SELECT M_Warehouse_ID, Value || ' - ' || Name AS ValueName "
+ "FROM M_Warehouse "
+ "WHERE IsActive='Y'",
"M_Warehouse", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO)
+ " ORDER BY Value";
pickWarehouse.addItem(new KeyNamePair (0, ""));
pstmt = DB.prepareStatement(SQL, null);
rs = pstmt.executeQuery();
while (rs.next())
{
KeyNamePair kn = new KeyNamePair
(rs.getInt("M_Warehouse_ID"), rs.getString("ValueName"));
pickWarehouse.addItem(kn);
}
DB.close(rs, pstmt);