In practice, a firm usually receives trade credit financing from its supplier on the purchase of inventory. Similarly, in order to meet competition and generate credit sales over and above cash sales, the firm also gives credit period to their customers. However, the decision of granting credit period may have a disintegrating effect on cash sales apart from generating new credit sales because some of the cash customers may switch to credit purchase. In addition, despite of the best credit granting policies and collection practices, the firm may incur some amount of bad debt losses because a certain fraction of buyers will undoubtedly be unable to pay off their debt obligations. In this paper, using discounted cash flow (DCF) approach, a mathematical model is developed to jointly determine optimal inventory and credit policies under two levels of trade credit financing when demand and bad-debt losses are dependent on credit period. The objective of the model is to maximize the present value of firm‘s net profit per unit time by jointly optimizing the replenishment interval and date-terms credit period. Numerical example and sensitivity analysis are presented to illustrate the effectiveness of the proposed model, and the results are discussed.