Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method UIEnableDisableComponent ( 
 | 
  Boolean isInit 
 | 
) id:Method_DialogCreateEditBaseRecipeIngredient_UIEnableDisableComponent 
 | 
{ 
 | 
  #keys: '[135040.0.219561692]' 
 | 
  Body: 
 | 
  [* 
 | 
    /* 
 | 
    // Enable/disable components 
 | 
    pisp      := DataHolderDialogData.Data(); 
 | 
    pispspec  := guard( pisp.PISPSpecification(), null( PISPSpecification ) ); 
 | 
     
 | 
    // Enable / disable UOM 
 | 
    batchUOMActive := not CheckboxBatchIsOverrideUOMForProduct.Visible()  
 | 
                      or CheckboxBatchIsOverrideUOMForProduct.Checked(); 
 | 
     
 | 
    hasUOMScrValue  := CheckboxIsOverrideUOMForProduct.Checked(); 
 | 
    hasUOMDataValue := guard( pispspec.HasUnitOfMeasure(), false ); 
 | 
    hasUOMValue     := ifexpr( isInit 
 | 
                              ,hasUOMDataValue 
 | 
                              ,hasUOMScrValue ); 
 | 
     
 | 
    DropDownListUOM.Enabled( hasUOMValue 
 | 
                             and batchUOMActive, "" ); 
 | 
  *] 
 | 
} 
 |