Lai,Risheng
2023-11-02 30c02e0c981b16be0918483543f4b812956c45d4
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Quintiq file version 2.0
#parent: SplitterWnd147/MatrixEditor
Response OnEndEdit (
  shadow[PlanningCell] cell,
  Real newvalue
) id:Response_SplitterWnd147_MatrixEditor_OnEndEdit
{
  #keys: '[127710.1.1993230177]'
  Body:
  [*
     
        
     pispips := construct( ProductInStockingPointInPeriodPlannings );
     pispip := cell.ProductInStockingPointInPeriodPlanning();
     pispips.Add( pispip );
    
        
        units := null( Units, owning );
        
        if( cell.Process_MP().istype( Operation ) )
        {
          units := selectset( cell.Process_MP().astype( Operation ), RoutingForPlanningMatrix.RoutingStep.Operation.Unit, u, true, true );
        }
        else
        {
          units := construct( Units );
          units.Add( cell.Process_MP().astype( LaneLeg ).AsProcess_MP() );
        }
        
        //Smart plan with user qty
        MacroPlan.RunSmartPlanForPeriodTask( pispip, newvalue, units, ScenarioManager, cell.Process_MP() );
    if ( not MacroPlan.GlobalParameters_MP().RunSmartPlanSynchronously() ) 
        {
          Application.RemoveHistory();
        }
        
        
        this.EndEdit( false );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_MatrixEditor_OnEndEdit'
}