Changed purchase table so that it increases quantity of an item, if it exists, instead of creating a new item