To convert purchase invoice to purchase return invoice, please go to Purchases >> Click on three dots (the purchase to which you want to convert to purchase return) > > Convert > > Convert to Purchase Return
Save.