|
|
@@ -35,7 +35,7 @@ class Order extends Api
|
|
|
if(empty($order_info)) $this->error(__("参数有误,无可用产品"));
|
|
|
$areaArr = explode(',', $params['area_id']);
|
|
|
$areaNum = count($areaArr);
|
|
|
- if(($order_info->num + $areaNum) > $order_info->stock) $this->error(__("库存不足"));
|
|
|
+ if(($order_info->num +$order_info->init_num+ $areaNum) > $order_info->stock) $this->error(__("库存不足"));
|
|
|
|
|
|
// 启动事务
|
|
|
Db::startTrans();
|