Գրեք սա: A Convex Dynamic Approach for Globally Optimal Profit in Supply Chains