xiaoding721
2023-11-13 e4edcfd0b987b239526f5375881b919789782dad
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
Quintiq file version 2.0
#parent: PanelOrderLockHeader_545/ButtonOrderLockHeaderLock
Response OnClick () id:Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderLock_OnClick
{
  #keys: '[412960.0.245380616]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  Precondition:
  [*
    checkorders := DataHolderOrderLockCheckedOrder.Data();
    pispips := construct( ProductInStockingPointInPeriods );
    traverse( checkorders, Elements, order ){
      pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ) );
      }
    return ProductInStockingPointInPeriod::CanLockUnlock( pispips, feedback );
  *]
  QuillAction
  {
    Body:
    [*
      checkorders := DataHolderOrderLockCheckedOrder.Data();
      pispips := construct( ProductInStockingPointInPeriods );
      macroplan := MacroPlan;
      traverse( checkorders, Elements, order ){
        pispips := pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, pispip.SupplyQuantity() > 0 ) );
        }
      
      pispipLeafs := selectset( pispips, 
                                Elements.astype( ProductInStockingPointInPeriodPlanningLeaf ), 
                                pispip, 
                                true );
      
      CustomerOrder::LockUnlock( macroplan, checkorders, true );
      ProductInStockingPointInPeriod::LockUnlockPlanning( pispipLeafs, true, true );
    *]
  }
}