Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method EnableDisableComponent ( 
 | 
  Boolean isbatchedit 
 | 
) id:Method_DialogCreateEditCustomerOrder_EnableDisableComponent 
 | 
{ 
 | 
  #keys: '[142576.0.84643258]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Enable disable components 
 | 
    //General tab 
 | 
    SelectionSalesSegment.Enabled( not isbatchedit or CheckBoxBatchEditSalesSegment.Checked() ); 
 | 
    LabelSalesSegment.Enabled( not isbatchedit or CheckBoxBatchEditSalesSegment.Checked() ); 
 | 
     
 | 
    SelectionProduct.Enabled( not isbatchedit or CheckBoxBatchEditProduct.Checked() ); 
 | 
    LabelProduct.Enabled( not isbatchedit or CheckBoxBatchEditProduct.Checked() ); 
 | 
     
 | 
    SelectionStockingPoint.Enabled( not isbatchedit or CheckBoxBatchEditStockingPoint.Checked() ); 
 | 
    LabelStockingPoint.Enabled( not isbatchedit or CheckBoxBatchEditStockingPoint.Checked() ); 
 | 
     
 | 
    GUIDateTimeSelectorOrderDate.Enabled( not isbatchedit or CheckBoxBatchEditOrderDate.Checked() ); 
 | 
    LabelOrderDate.Enabled( not isbatchedit or CheckBoxBatchEditOrderDate.Checked() ); 
 | 
     
 | 
    EditorCustomerName.Enabled( not isbatchedit or CheckBoxBatchEditCustomerName.Checked() ); 
 | 
    LabelCustomerName.Enabled( not isbatchedit or CheckBoxBatchEditCustomerName.Checked() ); 
 | 
     
 | 
    EditorCustomerID.Enabled( not isbatchedit or CheckBoxBatchEditCustomerID.Checked() ); 
 | 
    LabelCustomerID.Enabled( not isbatchedit or CheckBoxBatchEditCustomerID.Checked() ); 
 | 
     
 | 
    EditorOrderID.Enabled( not isbatchedit or CheckBoxBatchEditOrderID.Checked() ); 
 | 
    LabelOrderID.Enabled( not isbatchedit or CheckBoxBatchEditOrderID.Checked() ); 
 | 
     
 | 
    EditorOrderLineID.Enabled( not isbatchedit or CheckBoxBatchEditOrderLineID.Checked() ); 
 | 
    LabelOrderLineID.Enabled( not isbatchedit or CheckBoxBatchEditOrderLineID.Checked() ); 
 | 
     
 | 
    EditorPrice.Enabled( not isbatchedit or CheckBoxBatchEditPrice.Checked() ); 
 | 
    LabelPrice.Enabled( not isbatchedit or CheckBoxBatchEditPrice.Checked() ); 
 | 
     
 | 
    EditorQuantity.Enabled( not isbatchedit or CheckBoxBatchEditQuantity.Checked() ); 
 | 
    LabelQuantity.Enabled( not isbatchedit or CheckBoxBatchEditQuantity.Checked() ); 
 | 
     
 | 
    //Advance tab 
 | 
    SelectionCurrency.Enabled( not isbatchedit or CheckBoxBatchEditCurrency.Checked() ); 
 | 
    LabelCurrency.Enabled( not isbatchedit or CheckBoxBatchEditCurrency.Checked() ); 
 | 
     
 | 
    SelectionUnitOfMeasure.Enabled( not isbatchedit or CheckBoxBatchEditUnitOfMeasure.Checked() ); 
 | 
    LabelUnitOfMeasure.Enabled( not isbatchedit or CheckBoxBatchEditUnitOfMeasure.Checked() ); 
 | 
     
 | 
    CheckBoxIsExcludedFromFulfillmentKPI.Enabled( not isbatchedit or CheckBoxBatchEditIsExcludedFromFulfillmentKPI.Checked() ); 
 | 
     
 | 
    isenabledpriority := false; 
 | 
    if( CheckBoxIsExcludedFromFulfillmentKPI.Checked() ) 
 | 
    { 
 | 
      SelectionPriority.Data( null( Priority ) ); 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      isenabledpriority := not isbatchedit or CheckBoxBatchEditPriority.Checked(); 
 | 
     
 | 
      if( isnull( SelectionPriority.Data() ) ) 
 | 
      { 
 | 
        SelectionPriority.Data( SalesDemandBase::GetDefaultPriority( MacroPlan ) ); 
 | 
      } 
 | 
    } 
 | 
    SelectionPriority.Enabled( isenabledpriority ); 
 | 
    LabelPriority.Enabled( isenabledpriority ); 
 | 
     
 | 
    CheckBoxIsEligibleForNetting.Enabled( not isbatchedit or CheckBoxBatchEditIsEligibleForNetting.Checked() ); 
 | 
     
 | 
    CheckBoxIsFirmed.Enabled( not isbatchedit or CheckBoxBatchEditIsFirmed.Checked() ); 
 | 
  *] 
 | 
} 
 |