Quintiq file version 2.0 
 | 
#parent: GanttChartDemandSupplyGroup 
 | 
Response OnClick ( 
 | 
  structured[StockingPointInPeriod] selection 
 | 
) id:Response_GanttChartDemandSupplyGroup_MenuSmartPlan_OnClick 
 | 
{ 
 | 
  #keys: '[122872.1.835299364]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Smart plan for SPIPs 
 | 
    dlg := construct( DialogSmartPlan ); 
 | 
    isviableonestepupstream := false; 
 | 
    dlg.SmartPlan( selection, this, isviableonestepupstream ); 
 | 
  *] 
 | 
  CanBindMultiple: false 
 | 
  DefinitionID => /GanttChartDemandSupplyGroup/Responsedef_GanttChartDemandSupplyGroup_Menu_OnClick 
 | 
  Initiator: 'MenuSmartPlan' 
 | 
  Precondition: 
 | 
  [* 
 | 
    periods := selectset( selection, Elements.Period_MP, period, true ); 
 | 
    return MacroPlan.CanPlan( feedback ) 
 | 
           and ScenarioManager::CanStartSmartPlan( ScenarioManager, SelectionScenario.Data(), true, periods, feedback ); 
 | 
  *] 
 | 
} 
 |