yypsybs
2023-10-10 550ebcf02217f8a0c6fe9001fcfa8e42e9cd6b83
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
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() );
  *]
}