Hi Experts,
I have a sales order where I calculate a tradingdiscount amount.
When Tradingdiscount >0 then i want to debit to trading account & credit to customer account.
I checked in codeunit 80-where I found this fucntion as FillInvoicePostingbuffer.I wrote the code there but it is showing some wrong figures.
Can anyone help me out with this?
0
Comments
If it has something to do with an actual discount, can't financial discount, line discount, ... fullfill the requirement?
If it has to do something with multicurrency operations, can't the rouding and differences accounts fullfill the requirement?
But please don't go modifying posting routines unless you understand the total impact on the system.
I hope you'll test your solution with every possible sales scenario.
|To-Increase|
Thank you for the answer.
Actuallly tradingdisocunt is calculated on some setup.It has nothing to do with the currency or the standard sales line amount.
So i just want to create a GL entry of tradingdisocunt with debit to tradingdiscountaccount(mapped in posting setup) & credit to customer.
Best is to prepare one or 2 general journal lines during the posting routine and post them with gen. jrnl post with check codeunit. If you generate them in the invpostingbuffer then it's equally good.
But I would suggest to calculate the discount on the document itself. And based on that you can add line(s) to the invpostingbuffer trough your own function.
|To-Increase|
RIS Plus, LLC
The trade discount you're speaking of can be setup in the standard Navision. If not, you're doing something wrong.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book