Quintiq file version 2.0
#parent: #root
Method SetDefaultValues (
  Boolean isproductdependent
) id:Method_DialogCreateEditConversionFactor_SetDefaultValues
{
  #keys: '[113694.1.1016709458]'
  Body:
  [*
    // Set default values for dialog conversion factor
    data := Dialog.Data();
    
    sourceuom := data.SourceUnitOfMeasure();
    targetuom := data.TargetUnitOfMeasure();
    
    CheckBoxIsProductDependent.Checked( isproductdependent );
    
    if( isnull( data.SourceUnitOfMeasure() ) )
    {
      sourceuom := select( MacroPlan, UnitOfMeasure_MP, uom, true );
    }
    if( isnull( data.TargetUnitOfMeasure() ) )
    {
      targetuom := select( MacroPlan, UnitOfMeasure_MP, uom, true );
    }
    
    SelectionSourceUnitOfMeasure.Data( sourceuom );
    SelectionTargetUnitOfMeasure.Data( targetuom );
    
    Dialog.EnableDisableComponent();
  *]
}
