hongji.li
2023-10-26 dc03b8a0920cb6793a37e3a9cc4cd83ff384be94
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
Quintiq file version 2.0
#parent: #root
Method InitialUnitAndStockingPoint
{
  TextBody:
  [*
    // Administrator Sep-1-2023 (created)
    
    //Set the Default values
    //unitofMeasureName := "PCS";
    //currencyid := "CNY";
    //startdate := Date::Date( 1900, 1, 1 );
    //enddate := Date::Date( 9999, 12, 31 );
    //capacitytype := "Transport quantity";
    
    
    existcurrency := Currency_MP::FindById( this, "CNY" );
    if( isnull( existcurrency ) ){
      Currency_MP::CreateCurrency( this, "CNY", "CNY", "", true );
      currency := Currency_MP::FindById( this, "EUR" );
      currency.IsBase(false);
      Transaction::Transaction().Propagate();
      }
    
    isproductcatagory := false;
    isfromdb := false;
    existproductlevel := ProductLevel_MP::FindProductLevelTypeIndex( "2" );
    if( isnull( existproductlevel ) ){
      ProductLevel_MP::Create( "1", isproductcatagory, this, isfromdb );
      ProductLevel_MP::Create( "2", isproductcatagory, this, isfromdb );
      ProductLevel_MP::Create( "3", isproductcatagory, this, isfromdb );
      }
    
    existsalestlevel := SalesLevel_MP::FindSalesLevelTypeIndex( "2")
    if( isnull( existsalestlevel ) ){
        SalesLevel_MP::Create( "1",this,isfromdb);
        SalesLevel_MP::Create( "2",this,isfromdb);
      }
  *]
}