|
@@ -176,8 +176,9 @@ class CombindStock extends Base
|
|
|
"usable_stock"=>$row->stock_num,
|
|
|
"total_stock"=>$row->stock_num,
|
|
|
];
|
|
|
- $id =$stock->insertGetId($wsm_stock);
|
|
|
- if($id<=0) throw new \Exception('仓库库存数更新失败');
|
|
|
+ $info =$stock->create($wsm_stock);
|
|
|
+ if($info->id<=0) throw new \Exception('仓库库存数更新失败');
|
|
|
+ $id = $info->id;
|
|
|
}else{
|
|
|
$wsm_stock=[
|
|
|
'usable_stock'=>bcadd($stock->usable_stock,$row->stock_num),
|