Quintiq file version 2.0
|
#parent: #root
|
StaticMethod CanCreate (
|
output String feedback_o,
|
ProductInStockingPointInPeriods pispips
|
) declarative remote as Boolean
|
{
|
Description: 'Returns true if all pispips selected are of leaf products. Used in designer.'
|
TextBody:
|
[*
|
feedback_o := '';
|
|
/*
|
Check on PISP.IsLeaf() instead of PISPIP.IsLeaf() to distingiush whether CanCreate is false
|
because of non-leaf product. We can still create inventory supply from non-base period but then
|
inventory supply will be tied to its respective base period
|
*/
|
|
isallleafproducts := forall( pispips, Elements.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() );
|
|
if( not isallleafproducts )
|
{
|
feedback_o := Translations::MP_InventorySupply_CanCreate_NonLeafProduct();
|
}
|
|
return feedback_o = '';
|
*]
|
}
|