| Quintiq file version 2.0 | 
| #parent: #root | 
| Method Add ( | 
|   ProductInStockingPointInPeriodPlanning pispip | 
| ) | 
| { | 
|   TextBody: | 
|   [* | 
|     elt := pispip.PISPIPInOptimizerRun();  | 
|     if ( isnull( elt ) )  | 
|     { | 
|       elt := pispip.PISPIPInOptimizerRun( relnew );  | 
|     } | 
|     this.Add( elt ); | 
|      | 
|     if ( pispip.IsLeafPlanning() )  | 
|     { | 
|       pisp := pispip.ProductInStockingPoint_MP();  | 
|       number := pispip.Period_MP().SequenceNrInPlanning();  | 
|       oldnr := pisp.GetEstimatedPISPIPInScope(); | 
|       pisp.EarliestPISPIPIndex( minvalue(  pisp.EarliestPISPIPIndex(), number ) );  | 
|       pisp.LatestPISPIPIndex( maxvalue(  pisp.LatestPISPIPIndex(), number ) ); | 
|       increase := pisp.GetEstimatedPISPIPInScope() - oldnr;  | 
|       this.EstimatedNrPISPIPs( this.EstimatedNrPISPIPs() + increase );  | 
|     } | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |