Quintiq file version 2.0
#parent: #root
Method SnapToNonHistoricalPlanningHorizon (
  dpNavigationToolbar dpnavigationpanel
) id:Method_ApplicationLibMacroPlanner_SnapToNonHistoricalPlanningHorizon
{
  #keys: '[131438.0.415031329]'
  Body:
  [*
    // Snap to the non-historical planning horizon
    activeperiodsEnd := max( DataHolderActivePeriods.Data(), Elements, period,
                             not period.IsHistorical(),
                             period.End() );
    
    if( not isnull( DataHolderActivePeriods.Data() ) 
        and not isnull( MacroPlan ) )
    {
      dpnavigationpanel.Data().Show( MacroPlan.StartOfPlanning(), activeperiodsEnd )
    }
  *]
}
