Kevin Kok Khah Whey
2023-09-25 34d29be6a3eb0c025da50b77f2107c4ad259c6c0
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
Quintiq file version 2.0
#parent: MatrixEditorProductPlanning
Response OnClick (
  structured[ProductInStockingPointInPeriod] selection
) id:Response_MatrixEditorProductPlanning_MenuUnlock_OnClick
{
  #keys: '[136682.2.1137897470]'
  CanBindMultiple: false
  DefinitionID => /MatrixEditorProductPlanning/Responsedef_MatrixEditorProductPlanning_WebMenu_OnClick
  Initiator: 'MenuUnlock'
  Precondition:
  [*
    return ProductInStockingPointInPeriod::CanLockUnlock( selection, feedback );
  *]
  QuillAction
  {
    Body:
    [*
      // Unlock the total supply quantity of 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, false, true );
    *]
    GroupServerCalls: false
  }
}