| Quintiq file version 2.0 | 
| #parent: #root | 
| Method NewStockingPointCapacity ( | 
|   internal[GUIComponent] parent | 
| ) as StockingPointCapacity id:Method_DialogCreateEditStockingPointCapacity_NewStockingPointCapacity | 
| { | 
|   #keys: '[107528.0.125967442]' | 
|   Body: | 
|   [* | 
|     // New stocking point capacity | 
|      | 
|     owner := StockingPointCapacity::GetDefaultOwner( MacroPlan ); | 
|      | 
|     data := owner.StockingPointCapacity( relshadow, StockingPointID := owner.ID(), Start := MacroPlan.StartOfPlanning().Date() ); | 
|      | 
|     Dialog.Data( data ); | 
|     Dialog.SetDefaultValue( null( StockingPointInPeriod ) ); | 
|     Dialog.ShowHideComponents( false ); | 
|      | 
|     result := Dialog.DoModal( parent ); | 
|     newobj := null( StockingPointCapacity ); | 
|      | 
|     if( result > 0 ) | 
|     { | 
|       newobj := StockingPointCapacity::Create( data.StockingPoint_MP(), | 
|                                                data.Start(), | 
|                                                data.MaxCapacity(), | 
|                                                false ); | 
|     } | 
|      | 
|     return newobj; | 
|   *] | 
| } |