...if users don't go to AX, AX will go to the users...! a blog about Dynamics AX tips and tricks, Sharepoint and Reporting Services
Thursday, November 8, 2012
Calculation of the item average availability
Hi all!
This time I will talk to you about the way to calculate average availability over time in AX 2009.
The calculation of the average availability requires the availability of every item code on a specific date (usually at the end of month), but this information seems not available directly in AX 2009.
I found a way to retrieve this information: I create a batch class that runs every day and check if the current day is the last day of the month.
For doing this check I have used the "endMth" function, that works also with leap years
Here's the code:
void Run()
{
Table1 table1;
TransDate t = today();
TransDate lastdayofMth;
;
lastdayofMth = endmth(t);
if (t==lastdayofMth)
{
//Insert your code here for populate a custom table with item availability
}
}
This is part of a custom project I developed for get the Inventory Turnover Index in AX 2009.
(if anyone is interested please do not hesitate to contact me).
See you next time!...
Etichette:
availability,
average,
AX,
AX2009,
DAX,
inventory turnover
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment