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
| Quintiq file version 2.0
| #parent: #root
| StaticMethod Create (
| MacroPlan owner,
| String id,
| String unitid,
| String name,
| String unitofmeasurename,
| String currencyname,
| Boolean isplannedinfinite,
| Date start,
| Date end,
| String groupname,
| String description,
| Boolean isfromdb
| ) as StockingPoint_MP
| {
| Description: 'Instantiate stocking point instance with only primitive type arguments'
| TextBody:
| [*
| // Adhi Jan-13-2016 (created)
| unit := owner.FindUnit( unitid );
| unitofmeasure := owner.FindUnitOfMeasure( unitofmeasurename );
| currency := owner.FindCurrency( currencyname );
| group := owner.FindGroup( groupname );
|
| stockingpoint := StockingPoint_MP::Create( id,
| owner,
| unit,
| name,
| '', //iconname
| unitofmeasure,
| currency,
| isplannedinfinite,
| start,
| end,
| group,
| '', //giscountrycodej
| '', //giscity
| '', //gispostalcode,
| description,
| isfromdb );
|
| // If the given instance is not exists in the model, update the attribute with the given string.
| if( isnull( unit )
| or isnull( unitofmeasure )
| or isnull( currency )
| or isnull( group ) )
| {
| stockingpoint.UpdateForeignKey( unitofmeasurename, currencyname, groupname, unitid );
| }
|
| return stockingpoint;
| *]
| }
|
|