Quintiq file version 2.0
#parent: #root
Method EnableBatchEditComponents (
  Boolean isbatchedit
) id:Method_DialogCreateEditSafetyStock_EnableBatchEditComponents
{
  #keys: '[136682.2.183900471]'
  Body:
  [*
    //Enable disabled batch edit component
    Dialog.ShowHideComponentForRadioButtonValue();
    
    if( isbatchedit )
    {
      SelectionProduct.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit( "product"  ) ) ;
      SelectionStockingPoint.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit("stocking point")  );
      GUIStartDateTimeSelector.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit( "start" ) );
    }      
                              
    
    CheckBoxHasUserTarget.Enabled( not isbatchedit or CheckBoxBatchEdit.Checked() );
    RadioButtonGroupTarget.Enabled( ( not isbatchedit or CheckBoxBatchEdit.Checked() ) and CheckBoxHasUserTarget.Checked() );
    
    
    if ( isbatchedit )
    {
      EditorTargetInDays.Enabled( CheckBoxBatchEdit.Checked() and CheckBoxHasUserTarget.Checked() );
      EditorTargetInQuantity.Enabled( CheckBoxBatchEdit.Checked() and CheckBoxHasUserTarget.Checked() );
    }
    else
    {                                    
     
      EditorTargetInDays.Enabled( CheckBoxHasUserTarget.Checked() );
      EditorTargetInQuantity.Enabled( CheckBoxHasUserTarget.Checked() );
    }
  *]
}
