fixing duplicated record on add purchase