public Transaction store(int articleID, int quantity, GregorianCalendar date)
			throws NotEnoughSpaceException
	{
		if (enoughFreeSpace(articleID, quantity)) {
			int tempQuantity = quantity;

			while (tempQuantity > 0) {
				for (int j = 0; j < locations.length && tempQuantity > 0; j++) {
					while (locations[j].getFreeSpace() > Assortment.getArticleVolume(articleID)
							&& tempQuantity > 0) {
						locations[j].addArticle(new Article(articleID));
						tempQuantity--;
					}
				}
			}
			return new Transaction(articleID, quantity, date);
		} else {
			throw new NotEnoughSpaceException();
		}

	}