Browse Source

库存问题

shish 8 months ago
parent
commit
8a05c452a3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      biz-ghs/product/classes/ProductClass.php

+ 2 - 1
biz-ghs/product/classes/ProductClass.php

@@ -1006,7 +1006,8 @@ class ProductClass extends BaseClass
                 $newItemCost = 0;
             }
             //如果减库存之后,还有剩余库存,则变更新的平均成本。如果没有库存不再变更平均成本。如没有库存了还变更,会造成全部调拨出库时,保存的成本是0,重要!!!!!!!!!!
-            if($newStock>0){
+            //确实是,如果没有库存了,平均成本也不能再变化了。如果再变化,平均成本也是变成0。变成0后,如果再盘点几个库存出来,会变成没有成本的库存。 ssh 20251130
+            if ($newStock > 0) {
                 $productData->avCost = $avCost;
             }
             $productData->totalCost = $newItemCost;