xiaoding721
2024-11-14 7a48109b4bc75b886dd7180d7db35ad2bf33fb67
_Main/BL/Type_LockPeriod/Method_Enable.qbl
@@ -1,19 +1,19 @@
Quintiq file version 2.0
#parent: #root
Method Enable (
  const NewOfflinePlanTable offlinePlanTable
  const OfflinePlanArchiveVersion offlinePlanTable
)
{
  TextBody:
  [*
    // Akari Oct-30-2024 (created)
    offlinePlanRow := select( offlinePlanTable,NewOfflinePlanRow,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() and row.StockingPointID() = this.ProductInStockingPoint_MP().StockingPointID() );
    offlinePlanRow := select( offlinePlanTable,Row,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() and row.StockingPointID() = this.ProductInStockingPoint_MP().StockingPointID() );
    
    offlinePlanCells := selectset( offlinePlanRow, NewOfflinePlanCell,cell,true );
    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.NewOfflinePlanColumn().StartDate().AsQUILL() );
      offlinePlanCellHandle := offlinePlanCellIndexTree.GetHandle( offlinePlanCell.Column().StartDate().AsQUILL() );
      offlinePlanCellIndexTree.Root().AddChild( offlinePlanCellHandle,i );
    }