| Quintiq file version 2.0 | 
| #parent: #root | 
| Method GetHasValidLeafPISPIP ( | 
|   output Strings feedback_o, | 
|   output Strings sanitycheckfeedback_o | 
| ) declarative remote as Boolean | 
| { | 
|   Description: 'Returns true when the inventory supply is linked to leaf product in stocking point in period.' | 
|   TextBody: | 
|   [* | 
|     // Adhi Nov-11-2015 (created) | 
|      | 
|     product := this.Product_MP(); | 
|      | 
|     isvalid := product.IsLeaf(); | 
|      | 
|     if( not isnull( feedback_o ) and not isvalid ) | 
|     { | 
|       instance := InventorySupply::GetInstanceText( product, | 
|                                                     this.StockingPoint_MP(), | 
|                                                     this.Date() ); | 
|       message := ifexpr( guard( not this.ProductInStockingPointInPeriodPlanning().IsBase(), true ), | 
|                          Translations::MP_InventorySupply_CanCreate_NonBasePeriod(), | 
|                          Translations::MP_InventorySupply_CanCreate_NonLeafProduct() ); | 
|      | 
|       feedback_o.Add( SanityCheckMessage::GetFormattedMessage( instance, message ) ); | 
|       sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryUnclassifiedError() ); | 
|     } | 
|      | 
|     return isvalid; | 
|   *] | 
| } |