陈清红
2025-04-14 0b84c9999f07bc46275f5947c4b8ebf5ce0c25cf
_Main/BL/Type_InventoryPlanArchiveRow/Method_SetQuantity.qbl
@@ -3,7 +3,8 @@
Method SetQuantity (
  InventoryPlanArchiveColumn column,
  Real planqty,
  Real actualaty
  Real actualaty,
  NamedValueTree resetNVT
)
{
  TextBody:
@@ -15,7 +16,16 @@
    
      column.Cell( relinsert, cell );
    }
    // 判断是否重置为0
    resetH := resetNVT.GetHandle( this.ShowName() + column.StartDate().Format( "Y-M2-D2" ) );
    if ( guard( isnull( resetNVT.Root().Child( resetH ) ), true ) ) {
      cell.PlanQuantity( 0 );
      resetNVT.Root().AddChild( resetH );
    }
    cell.PlanQuantity( cell.PlanQuantity() + planqty );
    cell.ActualQuantity( cell.ActualQuantity() + actualaty );
    cell.ActualQuantity( actualaty );
  *]
}