lazhen
2025-01-07 b3987122cbbc46c5c59d3173f37fca3170b6dc5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Quintiq file version 2.0
#parent: #root
Method ShowHideComponents (
  String costDriver
) id:Method_DialogCreateEditTransportationCost_ShowHideComponents
{
  #keys: '[145730.1.919740149]'
  Body:
  [*
    // Hide time unit and length of time for cost drivers such as (not exhaustive) changeover cost & staffing
    // Note: Although time cost driver is removed in WC, we keep the component just in case
    isVisible := AccountAssignment::GetTimeUnitVisibility( costDriver );
    
    Form.PanelTimeUnit().Visible( isVisible );
    Form.PanelLengthOfTime().Visible( isVisible );
    
    // Set cost label
    Form.SetCostLabel( EditFieldLengthOfTime.Text(),
                       DropDownStringListTimeUnit.Text(),
                       DropDownStringListCostDriver.Text() );
    // Set components disable/enable during batch create/edit
    Form.EnableDisableBatch();
  *]
}