| Quintiq file version 2.0 | 
| #parent: #root | 
| Method GetIsInPISPIP ( | 
|   ProductInStockingPointInPeriods pispips | 
| ) declarative remote as Boolean | 
| { | 
|   Description: | 
|   [* | 
|     Given PISPIP, indicate if the trip is transporting the product in stocking point and arrive at the period. | 
|     Trips will be filtered based on its destination stocking point, product and period when a PISPIP in the product planning Gantt chart is selected. | 
|   *] | 
|   TextBody: | 
|   [* | 
|     // desmondt Jun-4-2015 (created) | 
|     value := false; | 
|      | 
|     if( this.HasValidArrival() ) | 
|     { | 
|       value := exists( pispips, Elements, pispip, | 
|                        exists( this, | 
|                                ProductInTrip.ArrivalPISPIP.ProductInStockingPoint_MP, | 
|                                prodintransit, | 
|                                ( prodintransit = pispip.ProductInStockingPoint_MP() | 
|                                  or ( pispip.ProductInStockingPoint_MP().StockingPoint_MP() = prodintransit.StockingPoint_MP() | 
|                                       and pispip.ProductInStockingPoint_MP().Product_MP().IsParentOf( prodintransit.Product_MP() )  | 
|                                     ) | 
|                                ) | 
|                                and this.ArrivalUnitPeriod().Period_MP().IsInPeriod( pispip.Start(), pispip.End() ) | 
|                              ) | 
|                      ); | 
|     } | 
|      | 
|      | 
|     return value; | 
|   *] | 
| } |