chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Quintiq file version 2.0
#parent: MatrixEditorProductPlanning
Response OnClick (
  structured[ProductInStockingPointInPeriod] objects
) id:Response_FormProductPlanningMatrix_MenuSmartPlan_OnClick
{
  #keys: '[127710.1.829789225]'
  Body:
  [*
    //Smart plan for PISPIPs
    dlg := construct( DialogSmartPlan );
    isviableonestepupstream := true;
    pispipPlannings := selectset( objects, Elements.astype( ProductInStockingPointInPeriodPlanning ), pispip, true )
    dlg.SmartPlan( pispipPlannings, this, isviableonestepupstream );
  *]
  CanBindMultiple: false
  DefinitionID => /Responsedef_FormProductPlanningMatrix_MatrixEditor_Menu_OnClick_19
  Initiator: 'MenuSmartPlan'
  Precondition:
  [*
    periods := selectset( objects, Elements.Period_MP, period, true );
    return MacroPlan.CanPlan( feedback )
           and ScenarioManager::CanStartSmartPlan( ScenarioManager, DataHolderActiveScenario.Data(), true, periods, feedback );
  *]
}