limj
2023-10-24 93652435728de839582440eefd5122c281181d35
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Quintiq file version 2.0
#parent: #root
Method UIShowHideComponentForBatchEdit (
  Boolean isInit,
  Boolean isBatchEdit
) id:Method_DialogCreateEditPISPSpecification_UIShowHideComponentForBatchEdit
{
  #keys: '[135040.0.219771730]'
  Body:
  [*
    // Handles the toggling of the batch related component
    if(  isInit )
    {
      //for initialize, control batch checkboxes visibility
      
      CheckboxBatchIsOverrideUOMForProduct.Visible( isBatchEdit );
      CheckboxBatchIsNegativeInventoryAllowed.Visible( isBatchEdit );
      CheckboxBatchIsExcluded.Visible( isBatchEdit );
      CheckboxBatchIsExcludedFromBalancing.Visible( isBatchEdit );
      CheckboxBatchIsSafetyStockKept.Visible( isBatchEdit );
      CheckboxBatchLotSize.Visible( isBatchEdit );
      CheckBoxIsBatchEditIsExcludeShelfLife.Visible( isBatchEdit );
      
      //disable all other component  
      if( isBatchEdit )
      {
        //do nothing, becasue all component is batch-editable
      } 
    }
    
    //batch UOM
    batchValidUOM := ifexpr( isInit
                            ,not isBatchEdit //when isBatchEdit,default=disable all
                            ,CheckboxBatchIsOverrideUOMForProduct.Checked() 
                           );
    CheckboxIsOverrideUOMForProduct.Enabled( batchValidUOM, "" );
    DropDownListUOM.Enabled( batchValidUOM
                             and CheckboxBatchIsOverrideUOMForProduct.Checked() 
                             , "" );
    
    //batch negative inv
    batchNegativeInvActive:= ifexpr( isInit
                                    ,not isBatchEdit //when isBatchEdit,default=disable all
                                    ,CheckboxBatchIsNegativeInventoryAllowed.Checked() 
                                    ); 
    CheckboxIsNegativeInventoryAllowed.Enabled( batchNegativeInvActive, "" );
    
    //batch IsExclude
    batchIsExcludedActive:= ifexpr( isInit
                                   ,not isBatchEdit //when isBatchEdit,default=disable all
                                   ,CheckboxBatchIsExcluded.Checked() 
                                   ); 
    CheckboxIsExcluded.Enabled( batchIsExcludedActive, "" );
    
    //batch Balancing
    batchBalancingActive:= ifexpr( isInit
                                   ,not isBatchEdit //when isBatchEdit,default=disable all
                                   ,CheckboxBatchIsExcludedFromBalancing.Checked() 
                                  ); 
    CheckboxIsExcludedFromBalancing.Enabled( batchBalancingActive, "" );
    
    //batch SafetyStock
    batchSafetyActive:= ifexpr( isInit
                                ,not isBatchEdit //when isBatchEdit,default=disable all
                                ,CheckboxBatchIsSafetyStockKept.Checked() 
                               ); 
    CheckboxIsSafetyStockKept.Enabled( batchSafetyActive, "" );
    
    
    //batch lotsize
    batchLotSizeActive:= ifexpr( isInit
                                ,not isBatchEdit //when isBatchEdit,default=disable all
                                ,CheckboxBatchLotSize.Checked() 
                               ); 
    EditFieldInputLotSizeUOM.Enabled( batchLotSizeActive, "" );
    
    //batch exclude shelf life
    batchExcludeShelfLife:= ifexpr( isInit
                                ,not isBatchEdit //when isBatchEdit,default=disable all
                                ,CheckBoxIsBatchEditIsExcludeShelfLife.Checked() 
                               ); 
    CheckBoxIsExcludeShelfLife.Enabled( batchExcludeShelfLife, "" );
  *]
}