| 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 | | Quintiq file version 2.0 |  | #parent: #root |  | Method New ( |  |   internal[GUIComponent] parent |  | ) as FulfillmentTarget id:Method_DialogCreateEditFulfillmentTarget_New |  | { |  |   #keys: '[127238.0.1975981168]' |  |   Body: |  |   [* |  |     // Create new service level |  |      |  |     salessegment := guard( DataHolderSalesSegments.Data().Element( 0 ), |  |                            select( MacroPlan, SalesSegment_MP, e, true ) ); |  |      |  |     product := guard( DataHolderProducts.Data().Element( 0 ), |  |                       select( MacroPlan, Product_MP, e, true ) ); |  |      |  |     stockingpoint := guard( DataHolderStockingPoints.Data().Element( 0 ), |  |                             select( MacroPlan, StockingPoint_MP, e, true ) ); |  |      |  |     data := MacroPlan.FulfillmentTarget( relshadow, |  |                                          ID := MacroPlan.IDHolder().GetServiceLevelID(), |  |                                          SalesSegment_MP := salessegment, |  |                                          Product_MP := product, |  |                                          StockingPoint_MP := stockingpoint, |  |                                          Start := MacroPlan.Start().Date(), |  |                                         End := MacroPlan.End().Date() ); |  |      |  |     Dialog.Data( data ); |  |      |  |     this.EnableDisableComponents(); |  |      |  |     result := this.DoModal( parent ); |  |      |  |     fulfillmentTarget := null( FulfillmentTarget ) |  |      |  |     if( result > 0 ) |  |     { |  |       fulfillmentTarget := FulfillmentTarget::Create( MacroPlan, |  |                                                       '', // id, auto generated by system |  |                                                       data.IsEnabled(), |  |                                                       data.Name(), |  |                                                       data.Product_MP(), |  |                                                       data.StockingPoint_MP(), |  |                                                       data.SalesSegment_MP(), |  |                                                       data.TargetPercentage(), |  |                                                       data.Start(), |  |                                                       data.End(), |  |                                                       false, |  |                                                       true, |  |                                                       false ); |  |      |  |     } |  |      |  |     return fulfillmentTarget; |  |   *] |  | } | 
 |