From 729de9e254cb300d6937508eb7f7e1f24607acf7 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 18 十一月 2024 17:21:08 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
---
_Main/BL/Type_LockPeriod/Method_Enable.qbl | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/_Main/BL/Type_LockPeriod/Method_Enable.qbl b/_Main/BL/Type_LockPeriod/Method_Enable.qbl
index 56456a3..8582f7c 100644
--- a/_Main/BL/Type_LockPeriod/Method_Enable.qbl
+++ b/_Main/BL/Type_LockPeriod/Method_Enable.qbl
@@ -9,16 +9,15 @@
// Akari Oct-30-2024 (created)
offlinePlanRow := select( offlinePlanTable,Row,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() and row.StockingPointID() = this.ProductInStockingPoint_MP().StockingPointID() );
- offlinePlanCells := selectset( offlinePlanRow, Cell,cell,cell.Column().TimeUnit() = "Day" );
- offlinePlanCellIndexTree := NamedValueTree::Create();
- for( i := 0; i< offlinePlanCells.Size(); i++ ){
- offlinePlanCell := offlinePlanCells.Element( i );
- offlinePlanCellHandle := offlinePlanCellIndexTree.GetHandle( offlinePlanCell.Column().StartDate().AsQUILL() );
- offlinePlanCellIndexTree.Root().AddChild( offlinePlanCellHandle,i );
- }
-
-
- if( not this.IsEnable() ){
+ if( not this.IsEnable() and not isnull( offlinePlanRow )){
+ offlinePlanCells := selectset( offlinePlanRow, Cell,cell,cell.Column().TimeUnit() = "Day" );
+ offlinePlanCellIndexTree := NamedValueTree::Create();
+ for( i := 0; i< offlinePlanCells.Size(); i++ ){
+ offlinePlanCell := offlinePlanCells.Element( i );
+ offlinePlanCellHandle := offlinePlanCellIndexTree.GetHandle( offlinePlanCell.Column().StartDate().AsQUILL() );
+ offlinePlanCellIndexTree.Root().AddChild( offlinePlanCellHandle,i );
+ }
+
this.IsEnable( true );
pispips := selectset( this,ProductInStockingPoint_MP.ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ),period,period.Period_MP().StartDate() <= this.LockDate() );
@@ -58,6 +57,8 @@
}
}
ProductInStockingPointInPeriod::LockUnlockPlanning( pispips, true, true );
+ }else{
+ info( "Archive data [" + this.ProductInStockingPoint_MP().Name() + "] is null.")
}
*]
}
--
Gitblit v1.9.3