def collapse_ticket_lines(basket):
    """
    Collapses ticket lines into a single quantity for each date

    Parameters:
    basket (Basket Dictionary): The basket to collapse

    Returns:
    (Dictionary): The collapsed dictionary

    """
    ticket_dates = {}
    for date_id in basket:
        for type_id in basket[date_id]:
            if date_id in ticket_dates:
                ticket_dates[date_id] += basket[date_id][type_id]
            else:
                ticket_dates[date_id] = basket[date_id][type_id]
    return ticket_dates