lazhen
2025-01-07 b3987122cbbc46c5c59d3173f37fca3170b6dc5a
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
35
36
37
38
39
40
41
42
Quintiq file version 2.0
#parent: #root
Method EditInventorySpecification (
  internal[GUIComponent] parent,
  structured[InventorySpecification] selection
) id:Method_DialogCreateEditInventorySpecification_EditInventorySpecification
{
  #keys: '[11660.0.763179500]'
  Body:
  [*
    // Edit inventory specifications
    isbatchedit := selection.Size() > 1;
    Dialog.ShowHideComponentForBatchEdit( isbatchedit, true );
    
    data := shadow( selection.Element( 0 ) );
    Dialog.Data( data );
    
    result := this.DoModal( parent );
    
    if( result > 0 )
    {
      InventorySpecification::Update( selection,
                                      data.Product_MP(),
                                      data.StockingPoint_MP(),
                                      GUIStartDateTimeSelector.DateTime().Date(), // Read-only, apply changes to shadow is not taking place for read-only attribute when editing.
                                      false,
                                      false,
                                      0.0,
                                      0.0,
                                      CheckBoxBatchEditMinLevel.Checked(),
                                      data.HasMinLevelInDays(),
                                      data.MinLevelInDays(),
                                      data.MinLevelInQuantity(),
                                      CheckBoxBatchEditMaxLevel.Checked(),
                                      data.HasMaxLevel(),
                                      data.HasMaxLevelInDays(),
                                      data.MaxLevelInDays(),
                                      data.MaxLevelInQuantity(),
                                      false );
    }
  *]
}