Quintiq file version 2.0
#parent: MatrixEditorProductPlanning
Response OnClick (
  structured[ProductInStockingPointInPeriod] selection
) id:Response_MatrixEditorProductPlanning_MenuSmartPlan_OnClick
{
  #keys: '[136682.2.1137897471]'
  CanBindMultiple: false
  DefinitionID => /MatrixEditorProductPlanning/Responsedef_MatrixEditorProductPlanning_WebMenu_OnClick
  Initiator: 'MenuSmartPlan'
  Precondition:
  [*
    periods := selectset( selection, Elements.Period_MP, period, true );
    return ScenarioManager::CanStartSmartPlan( ScenarioManager, DataHolderActiveScenario.Data(), true, periods, feedback );
  *]
  QuillAction
  {
    Body:
    [*
      //Smart plan for PISPIPs
      dlg := construct( DialogSmartPlan );
      isviableonestepupstream := true;
      pispipPlannings := selectset( selection, Elements.astype( ProductInStockingPointInPeriodPlanning ), pispip, true )
      dlg.SmartPlan( pispipPlannings, isviableonestepupstream );
    *]
    GroupServerCalls: false
  }
}
