Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod InitiateSearch ( 
 | 
  InterfaceDataset owner 
 | 
) as OfflinePlanArchiveVersion 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // 甄兰鸽 Sep-29-2024 (created) 
 | 
    allunit                   := FinancialProductionReport::GetDefaultAllUnit(); 
 | 
    search                    := owner.OfflinePlanArchiveSearch(); 
 | 
    if( isnull( owner.OfflinePlanArchiveSearch() ) ){ 
 | 
      search                  := owner.OfflinePlanArchiveSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); 
 | 
    }else{ 
 | 
      search                  := owner.OfflinePlanArchiveSearch(); 
 | 
      search.Product( allunit ); 
 | 
      search.ProductionLine( allunit ); 
 | 
      search.TimeUnit(  Translations::MP_GlobalParameters_Day() ); 
 | 
      search.Unit( allunit ); 
 | 
      search.StartDate( Date::MinDate() ); 
 | 
      search.EndDate( Date::MaxDate() ); 
 | 
    } 
 | 
    table                     := selectobject( owner, OfflinePlanArchiveVersion, table, table.IsShow() ); 
 | 
    if( not isnull( table ) ){ 
 | 
      table.Generate( search); 
 | 
    } 
 | 
    return table; 
 | 
  *] 
 | 
} 
 |