8 views

Description

When displaying the years to choose for fiscal calendar generation, there is a restriction of -10 years to +10 years. For example, in 2018, when generating a Fiscal Calendar, you are limited to selecting the years from 2008 to 2028.

Steps to Reproduce

  1. Go to Systems Definition > Financial Management.

  2. Under Related Links, click Activate/Upgrade.

  3. Once the plugin has been activated, navigate to Fiscal Calendar and click Generate.

  4. Check the "Start Year" and the "End Year" values.

    Note that there is a limitation of a 10-year gap.

Workaround

  1. Place the following API code in the ITFM_FiscalCalendar script include:

    getFiscalYearForChoose: function(){ 
    var yearArray = []; 
    var gdt = new GlideDateTime(); 
    var currentYear = gdt.getYearUTC(); 
    for (var i = currentYear - 10; i <= currentYear + 15; i++) { //You can change the number of years before/after current year here 
    yearArray.push(i); 

    return yearArray; 
    }
  2. Make the following change in the generate_fiscal_calendar UI page at line 49.

    Change:

    <g2:evaluate var="jvar_yearForChoose" jelly="true" object="true"> 
    JSON.parse(new SNC.FiscalCalendar().getFiscalYearForChoose()); 
    </g2:evaluate>
    to:
    <g2:evaluate var="jvar_yearForChoose" jelly="true" object="true"> 
    new ITFM_FiscalCalendar().getFiscalYearForChoose(); 
    </g2:evaluate> 

Related Problem: PRB1246365

Seen In

Jakarta

Fixed In

London

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-08-01 03:59:12
Published:2018-08-01