In this paper, the framework of driftless control affine systems has been used for the study of inventory and production problems. A mathematical model for an economic problem was built by using some optimal control techniques. For the controllability issue of the optimal control system, which involves restrictions on the final quantities required, the Lie geometric methods have been applied. In order to find the optimal solution, the Pontryagin Maximum Principle has been used at the level of a Lie algebroid, which in this case consists in an integrable distribution of the tangent space. Finally, a numerical example is presented.