I wanted to create new financial year by copying all financial periods from previous year. I did it from General Ledger > Setup > Financial calendars. When I click on New Financial year, "Copy from last financial year" field is disabled.
When I checked code behind it and found this condition;
This condition is actually verifying the number of days in current year with the number of days in previous year. As I am creating new finanical year in current year from April 2015 to March 2016 which becomes 365 days which is not equal to number of days (364) in previous year as it was a leap year with feb of 28 days.
if ((periodEndDate.dateValue() - periodStartDate.dateValue()) ==
(prevFiscalYear.EndDate - prevFiscalYear.StartDate))
{
copyPrevYear.value(NoYes::Yes);
copyPrevYear.enabled(true);
periodEndDate.allowEdit(false);
periodStartDate.allowEdit(false);
periodUnit.allowEdit(false);
periodQty.allowEdit(false);
}
else
{
copyPrevYear.value(NoYes::No);
copyPrevYear.enabled(false);
periodEndDate.allowEdit(true);
periodStartDate.allowEdit(false);
periodUnit.allowEdit(true);
periodQty.allowEdit(true);
}
Is it actually a bug in AX or I can handle this situation in some parameter settings?
*This post is locked for comments
I have the same question (0)