@Override
	public boolean placeOrder(Order order) {
		List<BaseStock> baseStockList = order.getVendor().getBaseStockList();
		List<ToppingStock> toppingStockList = order.getVendor().getToppingStockList();
		
		
		if (!orderDataService.add(order))
			return false;
		
		BaseStock b = null;
		ToppingStock t = null;
		for(BaseStock item : baseStockList)
		{
			if (item.getBase().equals(order.getPizzaBase()))
			{
				b = item;
				break;
			}
		}
		if (b == null || b.getCount() == 0)
			return false;
		
		b.setCount(b.getCount() - 1);
		stockDataService.saveAmount(b);
		
		for(ToppingStock item : toppingStockList)
		{
			PizzaTopping[] toppings = order.getPizzaToppings();
			for(PizzaTopping topping : toppings)
			{
				if (item.getTopping().equals(topping))
				{
					item.setCount(item.getCount() - 1);
					stockDataService.saveAmount(item);
				}
			}
		}
		return true;
	}