
Hi all i use Dynamics AX 2012 R3 and right now i get some issue because i can get the item cost backdated.
i try to get from inventory value report summary but in this report i just can get the cost for the item that still have stock on system, but if there is some item that already don't have the stock but in that month we have transaction for that item, i can't get the item cost. can any one help me to get this with X++ code or there is some class i can used?
i try to used this job before but still can't
static void SL_FindItemCostPriceAsPerDate(Args _args)
{
InventDim inventDimCriteria;
ItemId itemId;
InventDimParm inventDimParm;
date perDate = mkDate(28,3,2016);
InventOnHand inventOnHand;
;
itemId = '010100002';
inventDimCriteria.inventBatchId = '123456';
inventDimParm.initFromInventDim(inventDimCriteria);
inventOnHand = InventOnhand::newParameters(itemId, inventDimCriteria, inventDimParm);
info(strfmt('%1', inventOnHand.costPricePcs(false, perDate)));
}
i try to used this but there is always 0
Hi,
The inventory value report has multiple configuration options available.
If you are for example interested in the costs of the items that have been sold then enable to COGS parameter or if you want to have some information on adjustment postings then select the profit and loss parameter.
Doing that allows you the costs of items that might not even be on stock as of today but for which you had costs over the last month/week/etc.
Best regards,
Ludwig