![]() |
#1 |
Участник
|
ax-erp: X++ code to find the Stock of Item by Date
Источник: http://microsoft-dynamics-ax-erp.blo...m-by-date.html
============== X++: static void findOnHand_ByDate(Args _args) { InventDim inventDim; InventDimParm inventDimParm; Itemid itemid; InventOnHand inventOnHand = new InventOnHand(); InventSumDateDim inventSumDateDim; TransDate transDate; ; // take a sample item for testing itemid = "20 MM RMC"; transDate = 13\01\2010; // take a combination of dimension , against which you want to find the stock inventDim.InventLocationId = "GW"; //Set the flag for the selected dimensions as active. inventDimParm.initFromInventDim(inventDim); //initialize the inventSumDateDim with Date,item,dimension and dim paramter inventSumDateDim = InventSumDateDim::newParameters(transDate, itemid, inventDim, inventDimParm); // Retrieve the onhand info info(strfmt("PostedQty: %1",inventSumDateDim.postedQty())); info(strfmt("DeductedQty: %1",inventSumDateDim.deductedQty())); info(strfmt("ReceivedQty: %1",inventSumDateDim.receivedQty())); } Источник: http://microsoft-dynamics-ax-erp.blo...m-by-date.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|