yanweiyuan3
2023-08-09 98db93a55d7079e89c706c18b15eeaecd0ec539a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Quintiq file version 2.0
#parent: #root
Method UIEnableDisableKeepSafetyStock () id:Method_DialogCreateEditPISPSpecification_UIEnableDisableKeepSafetyStock
{
  #keys: '[136682.1.463854340]'
  Body:
  [*
    // Hide/show or disable keep safetystock
    if ( exists(  DataHolderDialogDatas.Data(), Elements, pisp, true , not pisp.IsLeaf() ) )
    {  
      CheckboxBatchIsSafetyStockKept.Visible( false );
      CheckboxIsSafetyStockKept.Visible( false );
    }
    //When has salesdemand disabled option to update keep safety stock
    else if ( exists( DataHolderDialogDatas.Data(), Elements, pisp, pisp.HasSalesDemand() ) )
    {
      CheckboxBatchIsSafetyStockKept.Visible( false );
      CheckboxIsSafetyStockKept.Enabled( false, Translations::MP_Designer_DialogCreateEditPISPSpecification_DisableKeepSafetyStock());  
    }
  *]
}