|
@@ -1987,6 +1987,7 @@ class Purchin extends Base
|
|
|
$info = Db::name("purchease_in")->where(['wsm_in_code'=>$post['wsm_in_code'],"is_del"=>0])->findOrEmpty();
|
|
|
if(empty($info)) return error_show(1004,"未找到发货单数据");
|
|
|
if($info['status']!=1) return error_show(1004,"发货单状态有误");
|
|
|
+ if($info['send_num'] <$post['wsm_num'])return error_show(1004,"入库数量不可大于发货单总数量");
|
|
|
$cgdinfo = Db::name("purchease_order")->where(["cgdNo"=>$info['cgdNo'],"is_del"=>0])->findOrEmpty();
|
|
|
if(empty($cgdinfo)) return error_show(1004,"未找到采购单信息");
|
|
|
$good = Db::name("good_stock")->where(["wsm_code"=>$info['wsm_code'], "spuCode"=>$cgdinfo['spuCode'],"is_del"=>0])->findOrEmpty();
|