     order_by: credit_type.name,
     preload: [stocks: [food: :food_group]])
     |> Repo.all
-    |> Enum.map(&({&1.name, &1.id, &1.stocks}))
+    |> Enum.map(&({&1.name, &1.id, in_stock(&1.stocks)}))
     |> Enum.uniq
     |> append_meals_if_any(facility)
   end

    where: fragment("? IS NOT NULL", stocks.meal_id),
    preload: [:meal])
    |> Repo.all
  end

  @spec adjust_stock(integer(), integer(), integer(), integer() ) :: StockDistribution.t

    end)
  end

  defp in_stock(stocks) do
    stocks
    |> Enum.reject(&(&1.quantity == 0))
  end

end
