
Hello,
Im trying to make an SQL query on the sales line table for BI reporting. I have run into some problems with the fact that the unit cost doesn't get updated automaticly.
We sell a lot where we don't have the item in the warehouse yet, so a lot of sales lines and invoiced sales lines doesn't have a cost price.
Is there a workaround? Can i get a correct cost price from somewhere else? Can I get it from the Value Entry table or maybe Item Ledger Entry. Average price is fine - it doesn't have to be FIFO.
We are on a NAV2017 if that matters.
Yes you can get that from using Value Entry and Item Ledger Entry, once you find the Item Ledger Entry, filter the Value Entry table for that Item Ledger Entry No. then sum cost amount expected and cost amount Actual then divide by Item Ledger Entry Quantity * Qty. Per Unit of Measure