I need to manipulate invoice items & some other data after the invoice is created, so I've used sales_order_invoice_save_after event.
I know this event is fired more than just when creating the invoice, so most people recommend using other events such as sales_order_invoice_pay, but that's not a problem for my needs.
My surprise has came when debugging why things don't work as expected, and I've found that it seems this event is fired before the invoice is totally saved
For instance, inside the observer...
$invoice->getData() // returns some data, but... $invoice->getId() // returns nothing ¿¿??
If I look database, there is no record in sales_flat_invoice table
Anybody here has faced the same issue? So, which event could I use to get the invoice object after it is saved?