Merge pull request 'fix(warehouse): 修复仓库产品数量修改逻辑' (#458) from dev into main

Reviewed-on: #458
This commit is contained in:
mkm 2025-01-11 17:19:54 +08:00
commit e2726c6356

View File

@ -211,8 +211,13 @@ class WarehouseProductLogic extends BaseLogic
$nums=bcsub($params['nums'], $res['nums'],2);
self::incProductDecStorege($res, $nums,$admin_id);
}else{
$nums=bcsub($res['nums'],$params['nums'],2);
self::decProductIncStorege($res, $nums,$admin_id);
if($params['nums']==0){
$nums=$params['nums'];
self::decProductIncStorege($res, $nums,$admin_id);
}else{
$nums=bcsub($res['nums'],$params['nums'],2);
self::decProductIncStorege($res, $nums,$admin_id);
}
}
$datas = [
'total_price' => $params['total_price'],