解决导入商品遇到的初始库存的bug

This commit is contained in:
季圣华
2023-02-26 21:52:32 +08:00
parent bcd7402d11
commit fbafafdb60

View File

@@ -659,7 +659,7 @@ public class MaterialService {
BigDecimal initStock = getInitStock(mId, depotId);
BigDecimal currentNumber = getCurrentStockByMaterialIdAndDepotId(mId, depotId);
//当前库存的更新:减去初始库存,再加上导入的新初始库存
if(currentNumber!=null && initStock!=null) {
if(currentNumber!=null && initStock!=null && stock!=null) {
currentNumber = currentNumber.subtract(initStock).add(stock);
}
MaterialCurrentStock materialCurrentStock = new MaterialCurrentStock();