Quintiq file version 2.0
#parent: #root
Method UIShowHideComponent (
  Boolean isInit
) id:Method_DialogCreateEditPISPSpecification_UIShowHideComponent
{
  #keys: '[135040.0.219562511]'
  Body:
  [*
    //show / hide LotSizeHorizonInfo label
    data := guard( DataHolderDialogData.Data().PISPSpecification(), null( PISPSpecification ) );
    
    lotSizeDataValue   := guard( data.InputLotSize(), 0 );
    lotSizeScreenValue := ApplicationMacroPlanner.FormatStringToReal( EditFieldInputLotSizeUOM.Text() );
    lotSizeValue := ifexpr( isInit,
                            lotSizeDataValue,
                            lotSizeScreenValue );
    
    showLotSizeInfo := lotSizeValue > 0;
    LabelLotSizeHorizonInfo.Visible( showLotSizeInfo );
    
    if( showLotSizeInfo )
    {
      lotSizeInfo := Translations::MP_LotSize_Info_LotSizeHorizon( MacroPlan );
      LabelLotSizeHorizonInfo.Text( lotSizeInfo );
    }
  *]
}
