Options

Reverse G/L Entry From Code

OrangePieOrangePie Member Posts: 11
edited 2020-01-17 in NAV Three Tier
Good morning,
I've been trying to create a general ledger entry that would reverse the desired purchase transaction (or a part of transaction). All I really want to do is find the one general ledger entry and post it with negative amount, then post it again to another account. I'm using BC15 and the only event I found, that would allow me to do such a thing, seems to be OnAterPostPurchaseDoc. I intended to find the related purchase invoice lines and fill a general journal line with adequate values, then use "Gen. Jnl.-Post Line" codeunit to post it, but I just can't get it right.
Do you have any clues on how should I approach this task?
Sign In or Register to comment.