lazhen
2024-11-01 b068efe67a223c53e2d608b553d327ca61bfd1e9
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
31
32
Quintiq file version 2.0
#parent: #root
Method Enable (
  const NewOfflinePlanTable offlinePlanTable
)
{
  TextBody:
  [*
    // Akari Oct-30-2024 (created)
    offlinePlanRow := select( offlinePlanTable,NewOfflinePlanRow,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() );
    
    if( not this.IsEnable() ){
      pispips := selectset( this,ProductInStockingPoint_MP.ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ),period,period.Period_MP().StartDate() <= this.LockDate() );
      traverse( pispips,Elements,element ){
        if( element.NewSupply( relsize ) = 1 ){
          traverse( element,NewSupply,newSupply ){
            
          }
        }else if( element.NewSupply( relsize ) > 1 ){
          
        }else if( element.NewSupply( relsize ) = 0 ){
          unit := element.StockingPointInPeriod().StockingPoint_MP().Unit();
          operaction := select( unit,Operation,op,true );
          // PeriodTaskOperation::Create( )
        }
        
        
    
      }
    }
  *]
}