lazhen
2024-08-15 fe28d603a518b0561ab684570e71c0d2811329ab
_Main/BL/Type_EnginePipelineRow/Method_SetCellDemandValue.qbl
@@ -11,10 +11,10 @@
    // 甄兰鸽 Jun-24-2024 (created)
    cell := selectobject( this, Cell, cell, cell.Column() = column );
    
    demand := selectobject( cell, Demand, demand, demand.EngineType() = cell.Row().Name() and demand.Model() = segment and demand.Period() = column.Period() );
    demand := selectobject( cell, Demand, demand, demand.EngineType() = cell.Row().Name() and demand.Model() = segment and demand.Period() = column.StartDate() );
    
    if( isnull( demand ) ){
      demand := cell.Demand( relnew, EngineType := cell.Row().Name(), Period := column.Period(), Model := segment, Quantity := 0 );
      demand := cell.Demand( relnew, EngineType := cell.Row().Name(), Period := column.StartDate(), Model := segment, Quantity := 0 );
    }
    
    demand.Quantity( demand.Quantity() + quantity );