Quintiq file version 2.0 
 | 
#parent: #root 
 | 
MethodOverride ExecuteMove ( 
 | 
  Boolean isundo 
 | 
) 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // edz1 Aug-31-2016 (created) 
 | 
     
 | 
    // Select the source and target inventory specification and current target values 
 | 
    sourceinvspec := this.SourceInventorySpecification(); 
 | 
    destinationinvspec := this.DestinationInventorySpecification(); 
 | 
    sourcetargetvalue := sourceinvspec.TargetInQuantity_DELETED_Nov19(); 
 | 
    destinationtargetvalue := destinationinvspec.TargetInQuantity_DELETED_Nov19(); 
 | 
     
 | 
    // If this is a regular move, the move quantity is moved from the source to the destination 
 | 
    quantity := this.Quantity(); 
 | 
    newsourcetarget := sourcetargetvalue - quantity; 
 | 
    newdestinationtarget := destinationtargetvalue + quantity; 
 | 
     
 | 
    // If this is an undo move, the undo quantity is moved from the destination to the source 
 | 
    if( isundo ) 
 | 
    { 
 | 
      quantity := this.QuantityForUndo(); 
 | 
      newsourcetarget := sourcetargetvalue + quantity; 
 | 
      newdestinationtarget := destinationtargetvalue - quantity; 
 | 
    } 
 | 
     
 | 
    sourceinvspec.UpdateTargetInQuantity( newsourcetarget ); 
 | 
    destinationinvspec.UpdateTargetInQuantity( newdestinationtarget ); 
 | 
     
 | 
    // Update the iteration inventory specifications with the new target inventory if this was not an undo move 
 | 
    if( not isundo ) 
 | 
    { 
 | 
      this.UpdateIterationInventorySpecification( this.SourceInventorySpecification(), newsourcetarget ); 
 | 
      this.UpdateIterationInventorySpecification( this.DestinationInventorySpecification(), newdestinationtarget ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |