Saving stockitems to the database