Correct way to enter purchase invoice

To clarify, if you are running an inventory system then the first screenshot
If you are not running an inventory system then the second screenshot as you would be operating by the opening/closing stock system.

Both are valid, it just depends on the level or type of inventory control system used. Completely read the following topic