Production and Inventory Management with Substitutions