chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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 Copy (
  InventorySpecification selection,
  FormInventoryTargets formInventoryTargets
) id:Method_DialogCreateEditInventoryTarget_Copy
{
  #keys: '[139394.1.940437715]'
  Body:
  [*
    // Copy inventory target
    data := shadow( selection );
    data.ResetWrapped();
    
    DataHolderForm.Data( formInventoryTargets );
    
    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( false /*isbatchedit*/ );
    
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}