| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SetFilters () id:Method_FormPegging_SetFilters | 
| { | 
|   #keys: '[108486.1.1206033739]' | 
|   Body: | 
|   [* | 
|     // Set filters | 
|      | 
|     // Set filters on demand list | 
|     demandstring := 'true '; | 
|     supplysource := 'listsupply'; | 
|      | 
|     if( CheckBoxDemandFilterBySelectedSupplies.Checked() ) | 
|     { | 
|       demandstring := demandstring + ' and object.IsForSupply(' + supplysource + ') '; | 
|     } | 
|     if( CheckBoxDemandFilterByUnfulfilledDemands.Checked() ) | 
|     { | 
|       demandstring := demandstring + ' and object.HasUnfulfilledQuantity()'; | 
|     } | 
|      | 
|      | 
|     // Set filters on supply list | 
|     supplystring := 'true '; | 
|     demandsource := 'listdemand'; | 
|      | 
|     if( CheckBoxSupplyFilterBySelectedDemands.Checked() ) | 
|     { | 
|       supplystring := supplystring + ' and object.IsForDemand(' + demandsource + ') '; | 
|     } | 
|     if( CheckBoxSupplyFilterByAvailableSupplies.Checked() ) | 
|     { | 
|       supplystring := supplystring + ' and object.HasAvailableQuantity()'; | 
|     } | 
|      | 
|     GUIDataSetLevelSupply_MP.FixedFilter( supplystring ); | 
|     GUIDataSetLevelDemand_MP.FixedFilter( demandstring ); | 
|   *] | 
| } |