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
30
31
32
33
34
35
36
37
38
39
Quintiq file version 2.0
#parent: #root
Method SetPersistantFilter (
  Boolean enable
) id:Method_ApplicationLibMacroPlanner_SetPersistantFilter
{
  #keys: '[127710.1.1965793843]'
  Body:
  [*
    // Turn the persistant filter on (true) or off (false)
    
    //In here, add the forms that require persistant filtering to be turned off.
    formsalesdemand :=  Application.Frame().FindChildObject( typeof( FormSalesDemands ).Name() ).astype( FormSalesDemands );
    if( not isnull( formsalesdemand ) )
    {
      formsalesdemand.PersistentFilter( enable );
    }
    
    // Update inventory spec to be filtered only by products (owner)
    forminventoryspec :=  Application.Frame().FindChildObject( typeof( FormInventorySpecifications ).Name() ).astype( FormInventorySpecifications );
    if( not isnull( forminventoryspec ) )
    {
      forminventoryspec.PersistentFilter( enable );
    }
    
    // Update inventory supplies to be filtered only by products (owner)
    forminventorysupply :=  Application.Frame().FindChildObject( typeof( FormInventorySupplies ).Name() ).astype( FormInventorySupplies );
    if( not isnull( forminventorysupply ) )
    {
      forminventorysupply.PersistentFilter( enable );
    }
    
    formpispip :=  Application.Frame().FindChildObject( 'FormProductInStockingPointInPeriods' ).astype( FormProductInStockingPointInPeriods );
    if( not isnull( formpispip ) )
    {
      formpispip.PersistantFilter( enable );
    }
  *]
}