private boolean isAvailableForThisDay(MaterialQuantity mat, int quantity,
            GregorianCalendar day) {

        int quantityAvailable = mat.getQuantity();
        for (Reservation reserv : stock.getReservList()) {
            if (reserv.getMaterialQuantity().getMat().equals(mat.getMat())) {
                if (day.compareTo(reserv.getStartDate()) >= 0
                        && day.compareTo(reserv.getEndDate()) <= 0) {
                    // day is in the emprunt time
                    quantityAvailable -= reserv.getMaterialQuantity()
                            .getQuantity();
                }
            }
        }
        return (quantityAvailable >= quantity);
    }