renhao
2023-10-13 462215553c754d26acde8edab81b4a73f774e21e
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
26
27
28
29
30
31
32
33
34
Quintiq file version 2.0
#parent: #root
Method EditPISPSpecification (
  internal[GUIComponent] parent,
  structured[ProductInStockingPoint_MP] pisps
) id:Method_DialogCreateEditPISPSpecification_EditPISPSpecification
{
  #keys: '[124808.1.581116150]'
  Body:
  [*
    // Create / edit inventory value and costs and PISP specification
    
    isbatchedit := pisps.Size() > 1;
    
    pisp := pisps.Element( 0 );
    DataHolderPISP.Data( pisp ); 
    
    data := shadow( pisp.Product_MP() );
    Dialog.Data( data );
    
    Dialog.SetDefaultValue();
    
    Dialog.ShowHideComponents( isbatchedit );
    Dialog.EnableDisableComponents();
    
    result := Dialog.DoModal( parent );
    
    if( result > 0 )
    {
      Dialog.SynchronizePISPSpecification( pisps );  
      data.Commit();
    }
  *]
}