yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
Quintiq file version 2.0
#parent: #root
StaticMethod MenuPostponedAllowed (
  LibUTF_IterationRun run,
  MacroPlan macroplan,
  Boolean checkallowed,
  NamedValueTree nvt_salesdemandinperiods
)
{
  TextBody:
  [*
    feedback_o :='';
    sdips := UI_SalesDemandInPeriod::FindMultiple( run, macroplan, nvt_salesdemandinperiods );
    allowedperiods := BaseSalesDemandInPeriod::GetAllowedPostponementPeriods( sdips );
    info( "allowedperiods>>", allowedperiods.Size());
    periods := construct( Period_MPs); 
    traverse( allowedperiods, Elements, p )
    {
      // cast object to non const
      periods.Add( p.AsMutable().astype( Period_MP ) );  
    }
    info( "periods>>", periods.Size())
    allowed := SalesDemandInPeriod::CanPostpone( sdips, periods, feedback_o )
    text := 'SalesDemandInPeriod allowed to postponed check:' + feedback_o;
    
    UI_Utility::ValidateTrue( run, checkallowed, allowed, text );
  *]
  InterfaceProperties { Accessibility: 'Module' }
}