How to trace Proforma Invoice record while posting proforma invoice of any sales order

Hi All,

I have a requirement where i have to assign a new number sequence for invoice id while posting proforma invoice of any sales order. I am created number sequence with the condition i can assign new number sequence to invoice id.

But i have to make this proforma invoice as a final invoice and sales order is no more for posting and change status of that sales order as invoiced.

I am tried to debug it but not able to find any clue where the temporary data hold at time of proforma invoice posting. Please suggest me where i can find temporary data hold at time of proforma invoice posting for SO.

Any suggestion is very much appreciated.

Thank You.