Quintiq file version 2.0
#parent: #root
Method SetFilters () id:Method_ApplicationLibMacroPlanner_SetFilters
{
  #keys: '[124808.0.1687796487]'
  Body:
  [*
    // Set filter for checkboxes on navigation panel
    listproductfilter := 'not object.IsSystem() ';
    listentitysource := 'dataholderchildstockingpoints';
    
    if( CheckBoxFilterPDByStockingPointInPanel.Checked() )
    {  
      listproductfilter := listproductfilter + ' and object.IsInStockingPoint( ' + listentitysource + ' ) '; 
    }
    
    GUIDataSetLevelProducts.FixedFilter( listproductfilter );
    
    // To keep the forms checkbox and filters in sync
    productform := this.GetFormProducts();
    
    // we need to set filter because the list is hierarchical
    if( not isnull( productform ) )
    { 
      productform.GUIDataSetLevelProducts().FixedFilter( listproductfilter );
    }
  *]
}
