Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod CanMoveQuantity ( 
 | 
  NewSupply sourcenewsupply, 
 | 
  ProductInStockingPointInPeriod destinationPISPIP, 
 | 
  output String feedback_o 
 | 
) const remote as Boolean 
 | 
{ 
 | 
  Description: 'check if moving new supply quantity is allowed. (Precondition in desginer)' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // huat heng Sep-17-2013 (created) 
 | 
    feedback_o := ''; 
 | 
     
 | 
    sourcePISPIP := sourcenewsupply.ProductInStockingPointInPeriodPlanningLeaf(); 
 | 
    sourcePISP := sourcePISPIP.ProductInStockingPoint_MP(); 
 | 
    destinationPISP := destinationPISPIP.ProductInStockingPoint_MP(); 
 | 
     
 | 
    //same productinstockingpoint and different period 
 | 
    if( sourcenewsupply.IsNewSupplyOfTrip() ) 
 | 
    { 
 | 
      feedback_o := Translations::MP_PeriodTaskOperation_CanMoveQuantity_IsNewSupplyOfTrip(); 
 | 
    } 
 | 
    else if( sourcePISP <> destinationPISP ) 
 | 
    { 
 | 
      feedback_o := Translations::MP_PeriodTaskOperation_CanMoveQuantity_IsDifferentPISP( sourcePISP.Name(), destinationPISP.Name() ); 
 | 
    } 
 | 
    else if( sourcePISPIP = destinationPISPIP ) 
 | 
    { 
 | 
      feedback_o := Translations::MP_PeriodTaskOperation_CanMoveQuantity_IsSamePeriod(); 
 | 
    } 
 | 
    return feedback_o = ''; 
 | 
  *] 
 | 
} 
 |