Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetAdditionalPISPIPSInventorySpecification ( 
 | 
  const LibOpt_Scope scope, 
 | 
  constcontent ProductInStockingPointInPeriodPlannings currentpispips 
 | 
) const as constcontent owning ProductInStockingPointInPeriodPlannings 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    additionalpispips := construct( ProductInStockingPointInPeriodPlannings, constcontent );  
 | 
    traverse( currentpispips,  
 | 
              Elements,  
 | 
              firstpispip, 
 | 
              guard( not scope.Contains( firstpispip.PreviousPlanningPISPIP().PISPIPInOptimizerRun() ), false ) )  
 | 
    { 
 | 
      pispiptoadd := firstpispip.PreviousPlanningPISPIP();  
 | 
       
 | 
      while(  not isnull( pispiptoadd )  
 | 
              and  
 | 
              pispiptoadd.End() +   
 | 
              Duration::Days( pispiptoadd.GetMaxDays() ) > firstpispip.Start() ) 
 | 
      { 
 | 
        additionalpispips.Add(  pispiptoadd );  
 | 
        pispiptoadd := pispiptoadd.PreviousPlanningPISPIP();  
 | 
      } 
 | 
    }   
 | 
    return &additionalpispips; 
 | 
  *] 
 | 
  InterfaceProperties { Accessibility: 'Module' } 
 | 
} 
 |