On an inventory model with deteriorating items and decreasing time-varying demand and shortages