Use this function to create a Credit Invoice for all transactions that were included on the original invoice.
It is only possible to credit invoices that have been released. You can't create a credit invoice if a credit invoice already exists for the chosen invoice.
As a result of this function a credit invoice is created. This invoice needs to be released before it can be transferred to the General Ledger.
It also has the effect that new transactions are created. For each transaction on the original invoice two transactions are created, one credit transaction that is included on the credit invoice, and one debit invoice that can be used to create a new invoice if desired. The invoicing status of the debit transaction is by default set to not invoiceable.