hongji.li
2023-11-11 df5a7e1ad6835e78b2f9eb7428817b0c23b116bc
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 SetLabel () id:Method_DialogEditDefaultInventoryHoldingCost_SetLabel
{
  #keys: '[145730.1.477862922]'
  Body:
  [*
    // Change label when different radio button is selected
    // eg. if isAbsolute = true, set label to $/(MT*Year)
    // eg. else set label to % annual interest
    
    gp := MacroPlan.GlobalParameters_MP();
    
    displayUoMLabel := gp.GetDefaultInventoryUoM( Form.GetIsCostAbsoluteValue() );
    
    // Using the same editfield to show the default cost depending on user selecting annual interest rate or absolute
    value := ifexpr( Form.GetIsCostAbsoluteValue(),
                     gp.DefaultAbsoluteValueForInventoryHolding(),
                     gp.DefaultAnnualInterestRateForInventoryHolding() );
    
    EditFieldCost.Label( displayUoMLabel );
    EditFieldCost.Text( ApplicationMacroPlanner.FormatRealToString( value ) );
  *]
}