Added reading stock from database, inserting values into Purchase table
(history)