Monday, August 28, 2017

Get Month List

MonthListTmp GetMonthyearList()
{
    MonthListTmp   listMonthYearTmp;
    int i,j,k,l,m,n;
    ;
    k = mthOfYr(fromdate);
    l = year(fromdate);
    m = mthOfYr(todate);
    n = year(todate);
    delete_from listMonthYearTmp;
    for (i=k;i<=12;i++)
    {
        listMonthYearTmp.clear();
        listMonthYearTmp.Month = i;
        listMonthYearTmp.year = l;
        listMonthYearTmp.insert();
        if(m == i && l == n)
            break;
        if(i==12)
        {
            i=0;
            l = l+1;
        }
    }
    return listMonthYearTmp;
}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...