public int processReturn(int receiptid, java.util.Date returnDate, String upc, int qty) throws SQLException {	
		int retid = 0; // generated after insert into Return
		
		try {
			// insert return date, receiptid into Return table
			PreparedStatement ps = con.prepareStatement(
					"INSERT INTO ams_Return values (retid.nextval, ?, ?)",
					new String[]{"returnid"});
			ps.setDate(1, new java.sql.Date(returnDate.getTime()));
			ps.setInt(2, receiptid);
			ps.executeQuery();
			con.commit();
			
			ResultSet rs = ps.getGeneratedKeys();
			rs.next();
			retid = rs.getInt(1);
			
			processReturnItem(upc, retid, qty);
			
		} catch (ReturnException e) { //thrown by processReturnItem
			rollback();
			e.printStackTrace();
			throw new SQLException("Could not process return of item ");		
		}
		return retid;
	}