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'
}
