have a scenario of Puchase order Posting
when i create PO and do the invoice of PO then it just create voucher with po line amount.
I have two questios
1- How these po invoice voucher is created (which class or method is called) at invoice posting time
2- second scenarion is that i have to add one field in puchline table of commission and i want to deduct this amount
from puchline’s lineAmount but when i do this thing then it shwoing correct value at purchTable form
but when i do the invoice then it is created voucher on the bases of actual amount(befor commission amount deduct).
Kindly give your suggession how i can acheive this thing. It will be very kind of you.
Its very urgent
thanks in advance
AX Version AX2012r3
thanks for your quick reply
as you said that do break poin at insert of generalJournalAccountEntry Table there is no insert method in that table
second thing this is the same as discount but for discosunt i dont know also how it is executed.
in that above class there are so many method i could not get the exact method of creation general voucher
pls guide me
You have to override the insert method and have a break point there. From the call stack (while debugging) you will be able to know which method is triggering the voucher creation.
You can look at the cross references of discount field to know how it is being used.