| | |
| | | // 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"; |
| | | //unitofMeasureName := "PCS"; |
| | | //currencyid := "CNY"; |
| | | //startdate := Date::Date( 1900, 1, 1 ); |
| | | //enddate := Date::Date( 9999, 12, 31 ); |
| | | //capacitytype := "Transport quantity"; |
| | | |
| | | if( isnull( Unit::FindById( this, "空运" ) ) ){ |
| | | this.Unit( relnew, |
| | | ID := "空运", |
| | | Name := "空运", |
| | | UnitOfMeasureName := unitofmeasurename, |
| | | CurrencyID := currencyid, |
| | | StartDate := startdate, |
| | | EndDate := enddate, |
| | | CapacityType := capacitytype ); |
| | | } |
| | | |
| | | if( isnull( Unit::FindById( this, "库存事务处理" ) ) ){ |
| | | this.Unit( relnew, |
| | | ID := "库存事务处理", |
| | | Name := "库存事务处理", |
| | | UnitOfMeasureName := unitofmeasurename, |
| | | CurrencyID := currencyid, |
| | | StartDate := startdate, |
| | | EndDate := enddate, |
| | | CapacityType := capacitytype ); |
| | | } |
| | | |
| | | unitofmeasurename := "PCS"; |
| | | name := "手动创建库存点"; |
| | | currencyname := "CNY"; |
| | | isplannedinfinite := false; |
| | | datestart := Date::Construct(1900, 1, 1) ; |
| | | dateend := Date::Construct(9999, 12, 31); |
| | | groupname := " "; |
| | | description := " "; |
| | | isfromdb := true; |
| | | |
| | | if( isnull( StockingPoint_MP::FindById( this, "F13_FG_STOCK" ) ) ){ |
| | | StockingPoint_MP::Create( this, |
| | | "F13_FG_STOCK", |
| | | "F13", |
| | | name, |
| | | unitofmeasurename, |
| | | currencyname, |
| | | isplannedinfinite, |
| | | datestart, |
| | | dateend, |
| | | groupname, |
| | | description, |
| | | isfromdb ); |
| | | } |
| | | |
| | | if( isnull( StockingPoint_MP::FindById( this, "H10_SA_STOCK" ) ) ){ |
| | | StockingPoint_MP::Create( this, |
| | | "H10_SA_STOCK", |
| | | "H10", |
| | | name, |
| | | unitofmeasurename, |
| | | currencyname, |
| | | isplannedinfinite, |
| | | datestart, |
| | | dateend, |
| | | groupname, |
| | | description, |
| | | isfromdb ); |
| | | } |
| | | |
| | | if( isnull( StockingPoint_MP::FindById( this, "Q10_FG_STOCK" ) ) ){ |
| | | StockingPoint_MP::Create( this, |
| | | "Q10_FG_STOCK", |
| | | "Q10", |
| | | name, |
| | | unitofmeasurename, |
| | | currencyname, |
| | | isplannedinfinite, |
| | | datestart, |
| | | dateend, |
| | | groupname, |
| | | description, |
| | | isfromdb ); |
| | | } |
| | | |
| | | existcurrency := Currency_MP::FindById( this, "CNY" ); |
| | | if( isnull( existcurrency ) ){ |