Steps to generate credit notes for invoices