We present an optimization algorithm developed for a provider of software planning tools for distribution logistics companies. The algorithm computes a daily plan for a heterogeneous fleet of vehicles, that can depart from different depots and must visit a set of customers for delivery operations. Besides multiple capacities and time windows associated with depots and customers, the problem also considers incompatibility constraints between goods, depots, vehicles and customers, maximum route length and durations, upper limits on the number of consecutive driving hours and compulsory drivers' rest periods, the possibility to skip some customers and to use express courier services instead of the given fleet to fulfill some orders, the option of splitting up the orders, and the possibility of open routes that do not terminate at the depots. Moreover, the cost of each vehicle route is computed through a system of fares, depending on the locations visited by the vehicle, the distance traveled, the vehicle load and the number of stops along the route. We developed a column generation algorithm, where the pricing problem is a particular resource constrained elementary shortest path problem, solved through a bounded bi-directional dynamic programming algorithm. We describe how to encode the cost function and the complicating constraints by an appropriate use of resources and we present computational results on real instances obtained from the software company.