public int sellStockToSettlement(StockType type, int volume)
	{
		int maxVolume = 0;
		if (this.warehouse.neededGoods.containsKey(type))
		{
			Stock stock = this.warehouse.neededGoods.get(type);
			
			if(warehouse.availableSpace >= type.getThickness()*volume)
			{
				maxVolume = volume;
			}
			else
			{
				maxVolume = warehouse.availableSpace/type.getThickness();
			}
			
			stock.addVolume(maxVolume);
			warehouse.usedSpace += type.getThickness()*maxVolume;
			warehouse.availableSpace = Warehouse.capacity - warehouse.usedSpace;
		}
		
		return maxVolume;
	}