Boundary conditions, fusion rules and the Verlinde formula