We investigate joint pricing and quality decisions in a lot sizing model for a single product with imperfect quality. We assume that the company performs an exhaustive quality inspection and discards the defective items detected before the demand is fulfilled. Unlike most of the literature, the time spent on the screening is considered as a decision variable which affects both the screening cost and the proportion of the defects which can be detected. The screening cost and the detection rate are general functions of the screening time to express the cost and efficiency of different detection methods. Additionally, consumer behaviour is considered by the use of a price and quality dependent demand function. The corresponding profit maximization problem is solved analytically, and numerical examples are provided to examine the impact of the corresponding decisions on the overall profit under various assumptions. Results show that applying the optimal screening time can result in significant profit gain through the higher selling price and/or the cost savings due to lower returns as well as increase of the related customer satisfaction. However, one must consider the joint effect of the parameters of the demand function, the cost and reliability of the screening method, as well as the impact of the initial quality level. The company can avoid overinvesting in quality if the screening method is not effective enough, too costly or exceeds customer requirements.