An optimal ordering strategy for a third-party managed supply chain