Kevin Kok Khah Whey
2023-11-07 5ae534ab606e6f2ba5ea60914224d665b0447d5a
_Main/BL/Type_Lane/StaticMethod_CreateLaneFromJson.qbl
@@ -16,7 +16,6 @@
    processingtime := Duration::Zero();
    
    unitofmeasurename := "PCS";
    currencyid := "CNY";
    startdate := Date::Date( 1900, 1, 1 );
    enddate := Date::Date( 9999, 12, 31 );
    capacitytype := "Transport quantity";
@@ -31,17 +30,17 @@
    
    unit := Unit::FindUnitTypeIndex( unitid );
    if( isnull( unit)){
      unit :=macroplan.Unit( relnew,
                 ID := unitid,
                 Name := unitid,
                 UnitOfMeasureName := unitofmeasurename,
                 CurrencyID := currencyid,
                 StartDate := startdate,
                 EndDate := enddate,
                 CapacityType := capacitytype );
      unit := macroplan.Unit( relnew, ID := unitid,
                   Name := unitid,
                   ParentUnitID := "运输",
                   CapacityType := capacitytype,
                   UnitOfMeasureName := unitofmeasurename,
                   CurrencyID := macroplan.BaseCurrency().ID(),
                   StartDate := startdate,
                   EndDate := enddate );
    }
    
    result := Lane::CreateLane( unit, id, name, processingtime);
    result := Lane::CreateLane( macroplan, unit, id, name, processingtime);
    
    return result;
  *]