|
@@ -60,7 +60,7 @@ class GoodStockInfo extends Model
|
|
|
if(empty($arr)) throw new Exception("库存批次数量不足","1006");
|
|
|
$list=[];
|
|
|
foreach ($arr as $item) {
|
|
|
- $stock = self::name("good_stock")->where(["id"=>$item['stockid']])->field("id,usable_stock,wait_out_stock")->find();
|
|
|
+ $stock = self::name("good_stock")->where(["id"=>$item['stockid']])->field("id,usable_stock,wait_out_stock")->find()->toArray();
|
|
|
if($num<=0) break;
|
|
|
$update=[];
|
|
|
if($item['balance_num']<=$num){
|