This paper analyses an inventory model for non-instantaneous deteriorating items under a two-warehouse system with the effect of inflation and time value of money. We propose the model from the seller's prospective by incorporating the fact that granting the trade credit from the seller to its buyer not only increases sales and revenue but also opportunity cost and default risk. Moreover, in this model, shortages are allowed and partially backlogged. The backlogging rate is dependent on the waiting time for the next replenishment. The purpose of this study is to determine the optimal credit period and the optimal order quantity such that the total profit of the seller is maximised. Some numerical examples are presented for illustrating the proposed inventory model. Furthermore, sensitivity analysis of the optimal solutions with respect to major parameters is carried out and some managerial inferences are obtained.