admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Quintiq file version 2.0
#parent: #root
Method ResetHasUserQuantity
{
  Description: 'Set HasUserQuantity to false'
  TextBody:
  [*
    // Martijn 13-Dec-2016 (modified)
    
    //reset manual plan on both period tasks and dependent demand
    if( this.HasUserQuantity() or this.HasDependentDemandUserQuantity() ) 
    {
      this.Update( 0.0, false );
      
      traverse( this, DependentDemand, dd, dd.HasUserQuantity() )
      {
        dd.HasUserQuantity( false );
        dd.UserQuantity( 0.0 );
      }
    }
    
    // Reset the total supply user for all related pispips
    // Do not reset it for the primary smart plan pispip if this is a smart plan and this method is being called at the start of an optimizer run
    
    traverse( this, NewSupply.ProductInStockingPointInPeriodPlanningLeaf, pispip )
    {
      pispip.UpdateTotalSupplyUser( false, 0.0 );
    }
  *]
}