Working on receipt class, addToArray method not working