Dear Karthik, please note that the accounts purchase and sale are in disguise of stock. Infact they are the accounts which affect you income, expense as well as the stock level.
If you are using Tally to make entries, then few configuration will help you enter stock in and stock out details when you want enter purchases. It can be so designed that the nature of voucher namely journal or purchase or sale makes no difference. Once you have to pass a purchase entry, it will manadatorily ask you what are the nature of stocks and which cateogory to be effected, accordingly you can pass an entry. Same follows in case of sales, if you have to pass sales entry it will ask you which stock is moving out. Balance amount of stock is well known which is shown in P&L and Balance Sheet.
If books are maintained manually, then you have purchase book, sales book and stock book to help you to manipulate stock levels.
In case of ERP, SAP and Oracle there are separate modules to monitor these requirements.
I hope your doubt is clarfied.