Invnetory and direct expenses lot wise tracking

Is there a way to manage my inventory on a lot-wise basis for both incoming and outgoing transactions in sales and purchase invoices, as well as for the quantity on hand? How can I ensure that the quantity on hand does not fall below zero, thereby preventing further sales of that item? Additionally, how can I display the total quantity in sales and purchase invoices at the bottom?

I have explored numerous discussions on these topics but have yet to find a viable or implementable solution. When I consult with a chatbot, the guidance provided, such as enabling an inventory tracking option, does not seem to exist in the desktop version. Therefore, I would like to request this feature. This software is already outstanding, but incorporating these capabilities would make it truly exceptional.

This is already in the ideas category