Material requirements planning systems are used in discrete manufacturing systems. In this article, mixed-integer programming is used to minimize the total cost that contains work in process inventory cost, setup cost, backorder costs, lost sales, additional product cost, and changes in the lead-time cost. Furthermore, it is considered that some part of the delayed demand is backorders and the other part is lost sales. Moreover, defective items and their impact on the demand of customers are discussed in this paper. The suggested deterministic model is single-objective and applied to a ready-mixed concrete production company. According to the optimal results, by decreasing the number of defective items, the manufacturing costs in the studied company can be reduced by %30. Also, the material ordering plan can be implemented according to planned lead times. Furthermore, in this article, a lower bound is suggested for the problem and the computational efficiency of the lower bound is evaluated.