1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod MenuNew ( 
 |    LibUTF_IterationRun run, 
 |    MacroPlan macroplan, 
 |    NamedValueTree nvt_actualunitperiod 
 |  ) 
 |  { 
 |    TextBody: 
 |    [* 
 |      dto := DTO_ActualUnitPeriod::ConstructNew( run, nvt_actualunitperiod ); 
 |      unitperiod := select( macroplan, Unit.PlanningUnitPeriod, up, up.UnitID() = dto.UnitID() and up.StartDate() = dto.Date() ); 
 |       
 |      if ( run.AssertNotIsNull( unitperiod, "Fail to create actual unit period. Unit period for unit " + dto.UnitID() + " on " + dto.Date().Format( "D-M-Y" ) + " not found." ) ) 
 |      { 
 |        ActualUnitPeriod::Create( unitperiod,  
 |                                  dto.ActualUtilizationPercentage(),  
 |                                  dto.ActualTotalAvailableQuantity(),  
 |                                  dto.ActualTotalAvailableDuration(),  
 |                                  dto.Description() );   
 |      } 
 |    *] 
 |    InterfaceProperties { Accessibility: 'Module' } 
 |  } 
 |  
  |