yanyuan
2023-11-01 d82c813f4c07b13801a92fc20b3054d23a32ec58
Fix InventoryCost error

修正了在InventoryCost 创建中进行FindById时,并不会by ID find 的问题,并放开了对其Update的代码注释
已修改2个文件
9 ■■■■■ 文件已修改
_Main/BL/Type_InventoryValueAndCost/StaticMethod_CreateOrUpdate.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryValueAndCost/StaticMethod_FindById.qbl 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryValueAndCost/StaticMethod_CreateOrUpdate.qbl
@@ -39,9 +39,9 @@
      } else if( result.ProductID() <> productId ) {
        info( "cannot change product of inventory value and cost" )
      } 
    //  else {
    //    result.Update( account, costDriver, start, account.DefaultTimeUnit(), account.DefaultLengthOfTime(), cost, true );
    //  }
      else {
        result.Update( account, costDriver, start, account.DefaultTimeUnit(), account.DefaultLengthOfTime(), cost, true );
      }
    }
    
    return result;
_Main/BL/Type_InventoryValueAndCost/StaticMethod_FindById.qbl
@@ -12,6 +12,9 @@
  [*
    // yypsybs Aug-16-2023 (created)
    value := select( macroPlan, Product_MP.InventoryValueAndCost, item, true, item.ProductID()=productId and item.StockingPointID() = stockPointId and item.Start() = start );
    if( isnull( value ) ){
      value := select( macroPlan, Product_MP.InventoryValueAndCost, item, true, item.ID() = id );
      }
    return value;
  *]
}