diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index 1d32d8356..122531f7e 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -352,6 +352,11 @@ class BeforehandOrderLogic extends BaseLogic throw new BusinessException('该订单已创建出库单'); } $info = BeforehandOrderCartInfo::where('bhoid', $params['bhoid'])->select(); + foreach ($info as $k => $v) { + if($v['pay_price']<=0){ + throw new BusinessException('商品价格未空 不能生成出库订单,对应id:'.$v['id']); + } + } $count = BeforehandOrderCartInfo::where('bhoid', $params['bhoid'])->where('cart_num', 0)->count('id'); if ($count > 0) { throw new BusinessException('订单中有数量为0的商品,请先处理');