yanweiyuan3
2023-08-09 fd693f0faf305ec98d7ea03e09fe6787817e71d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Quintiq file version 2.0
#parent: #root
Method Edit (
  structured[InventorySpecification] selection
) id:Method_DialogCreateEditInventoryTarget_Edit
{
  #keys: '[139394.1.939172224]'
  Body:
  [*
    // Edit inventory target
    data := shadow( selection.Element( 0 ) );
    DataHolderDialogDatas.Data( selection.Copy() ); 
    
    this.SetLabels( data.HasMinLevelInDays(), data.HasMaxLevelInDays(), guard( data.ProductInStockingPoint_MP().UnitOfMeasureName(), data.Product_MP().UnitOfMeasureName() ) );
    
    DataHolderDialogData.Data( &data );
    // set stocking point and product to dataholder to be use by OnUserUpdateUI method
    DataHolderProduct.Data( DataHolderDialogData.Data().Product_MP() );
    DataHolderStockingPoint.Data(DataHolderDialogData.Data().StockingPoint_MP() );
    
    this.InitializeComponents( selection.Size() >1 );
    
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}