| 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
 | | Quintiq file version 2.0 |  | #parent: #root |  | Method UpdateCommitLogic ( |  |   Boolean isnew |  | ) |  | { |  |   Description: 'Commit logic for stocking point.' |  |   TextBody: |  |   [* |  |     // Adhi Apr-27-2016 (created) |  |     if( isnew ) |  |     { |  |       // SynchronizeAfterCreation should have created a default unit node, update it |  |       view := select( this.MacroPlan(), ViewBase.astype( SupplyChainView ), scv, scv.User() = QuintiqUser::CurrentUser().ShortName() ); |  |      |  |       // Reuse the logic from OnCreate |  |       this.SynchronizeAfterCreation(); |  |      |  |       // Default setting for stocking point node |  |       textcolor           := 'Black'; |  |       namedisplaybehavior := ''; |  |       isvisible           := true; |  |      |  |       // Stocking point node is created in SynchronizeAfterCreation, update stocking point node |  |       spnode := select( this, StockingPointNode, n, n.SupplyChainView() = view ); |  |       if( not isnull( spnode ) ) |  |       { |  |         spnode.Update(  this.DefaultGridX(), this.DefaultGridY(), isvisible, namedisplaybehavior, textcolor ); |  |       } |  |     } |  |      |  |     newunit := select( this, MacroPlan.Unit, unit, unit.ID() = this.UnitID() ); |  |      |  |     //  The update method needs to be called everytime we commit the instance. |  |     this.Update( newunit, |  |                  this.ID(), |  |                  this.Name(), |  |                  this.UnitOfMeasure_MP(), |  |                  this.Currency_MP(), |  |                  this.IconName(), |  |                  this.IsPlannedInfinite(), |  |                  this.Start(), |  |                  this.End(), |  |                  this.Group(), |  |                  this.GISCountryCode(), |  |                  this.GISCity(), |  |                  this.GISPostalCode(), |  |                  this.Notes(), |  |                  false ); |  |   *] |  | } | 
 |