haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
Quintiq file version 2.0
#parent: MatrixEditorProductPlanning
Response OnClick (
  structured[ProductInStockingPointInPeriod] selection
) id:Response_MatrixEditorProductPlanning_MenuLock_OnClick
{
  #keys: '[136682.2.1137897473]'
  CanBindMultiple: false
  DefinitionID => /MatrixEditorProductPlanning/Responsedef_MatrixEditorProductPlanning_WebMenu_OnClick
  Initiator: 'MenuLock'
  Precondition:
  [*
    return ProductInStockingPointInPeriod::CanLockUnlock( selection, feedback );
  *]
  QuillAction
  {
    Body:
    [*
      // Lock total supply quantity for PISPIPs
      // This is a workaround, we supposedly set the bindingtype of selection as the subtype, but
      // the response would have trouble handling multiple cell selection, so for now, we bind the base type
      // then select the subtype
      
      
      pispipLeafs := selectset( selection, 
                                Elements.astype( ProductInStockingPointInPeriodPlanningLeaf ), 
                                pispip, 
                                true );
      
      ProductInStockingPointInPeriod::LockUnlockPlanning( pispipLeafs, true, true );
    *]
    GroupServerCalls: false
  }
}