From 6cf15a08f9ce74311cac09a81994b86d6ab5bcd8 Mon Sep 17 00:00:00 2001 From: yanyuan <yuan.yan@capgemini.com> Date: 星期三, 06 九月 2023 14:22:36 +0800 Subject: [PATCH] Merge branch 'dev_yy' into dev --- _Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl b/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl index e3f3545..b8b0705 100644 --- a/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl +++ b/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl @@ -90,16 +90,21 @@ isfromdb ); } - Currency_MP::CreateCurrency( this, "CNY", "CNY", "", true ); - currency := Currency_MP::FindById( this, "EUR" ); - currency.IsBase(false); - Transaction::Transaction().Propagate(); + 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; - - ProductLevel_MP::Create( "1", isproductcatagory, this, isfromdb ); - ProductLevel_MP::Create( "2", isproductcatagory, this, isfromdb ); - ProductLevel_MP::Create( "3", isproductcatagory, this, isfromdb ); + 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 ); + } *] } -- Gitblit v1.9.3