Purchase order invoicing

i have a requirement while we invoice the purch order in which class and in that class under which method (table-inventtrans)'s field invoiceID gets updated any help will be appeciated,tried debugging not able to come to any conclusion AX version :AX 2012 FP

Me also searching on same.If you get solution please post it Rohit.