Optimal inventory policies for deteriorating items with trapezoidal-type demand patterns and maximum lifetimes under upstream and downstream trade credits