How to Create credit memo for draft invoices based on events ?
Hi,
I have a requirement to create credit memo for invoices that are based on event PROGRAMATICALLY. Here is what I am doing
Create event
Generate Draft Invoice
Transfer Invoice
Import Invoice
Tie back invoice.
Now for credit memo, there is a button on the draft invoice to create it ( write -off) . When you click on that and enter amount it will create a draft invoice and when you transfer it, it will transferred as credi memo to AR.
I want to do the same thing programatically. I tried to create events of event type "Invoice Adjustment " and "Manual" with -ve invoice amount.