Quintiq file version 2.0
#parent: #root
Method New (
  FormSupplyTarget formSupplyTarget
) id:Method_DialogCreateEditSupplyTarget_New
{
  #keys: '[139394.1.54619933]'
  Body:
  [*
    // New supply spec
    owner := select( DataHolderUnit.Data(), Elements, e, e.GetHasOutputProducts() );
    
    data := owner.SupplySpecification( relshadow, UnitID := owner.ID(), ProductID := "", Start := MacroPlan.StartOfPlanning(), End := DateTime::MaxDateTime() ); // Temporary set ProductID to empty, will be based on user assigned value
    
    DataHolderDialogData.Data( &data );
    
    DataHolderForm.Data( formSupplyTarget );
    
    this.InitializeComponents();
    
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
