| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod AddPISPIPBeforeLastToFirst ( | 
|   output ProductInStockingPointInPeriodPlanningLeafs candidates_o, | 
|   ProductInStockingPoint_MP pisp, | 
|   ProductInStockingPointInPeriodPlanningLeaf lastpispip, | 
|   DateTime first | 
| ) as ProductInStockingPointInPeriodPlanningLeaf | 
| { | 
|   TextBody: | 
|   [* | 
|     lastpispip := lastpispip.PreviousPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf );  | 
|     lastadded := null( ProductInStockingPointInPeriodPlanningLeaf );  | 
|     while(  not isnull( lastpispip ) | 
|                         and lastpispip.Start() >= first )  | 
|     { | 
|       candidates_o.Add( lastpispip );  | 
|       lastadded := lastpispip;  | 
|       lastpispip := lastpispip.PreviousPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf );  | 
|     } | 
|     return lastadded; | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |