I've have been tasked with extending the general ledger posting for product receipt in an DAX 2012.
In 2012 it seems to me that Microsoft har started a transition away from using the traditional LedgerVoucher, LedgerVoucherObject and LedgerVoucherTransObject way of doing postings to General Ledger, to using the Source Document Framework.
In my case I am to extend the general ledger posting so that extra postings are made, when doing a product receipt. Now when doing a product receipt update, two voucher are actually created. One accounting for the physical receipt of products, and one for accrual of liabilities on product receipt (this is set up on the Item Model Group / (field group 'Ledger integration') / (field) Accrue liability on product receipt.
I've managed to extend the posting of one of the vouchers by modifying the class InventMovement and the method updateLedgerPhysical which uses the LedgerVoucherTransObject::newTransactionsAmountDefault way of doing things.
This I found by using the debugger and placing a breakpoint in the above mentioned method, and then back tracing in the call stack where to the correct method.
But for the other voucher (accrual of liabilities) I am at a loss where to look for the actual general ledger posting, as it seems to me that addTrans method of the ledgerVOucherTransObject is never called for this voucher ?!?!?!
I have tried debugging at the AOS with CIL and without CIL-execution, and I suspect that the source document framework posts to general ledger using some other means than the LedgerVoucher classes.
Has anyone got any experience with the source document framework and especially how to add general ledger postings using this frame work and in my case, where I have to look to find the right place for my modicfication.