How to convert a purchase invoice into a refund or recurring one