|
@@ -731,9 +731,11 @@ class Resign extends BaseController
|
|
|
if($supplier==false){
|
|
|
return error_show(1004,"未找到供应商数据");
|
|
|
}
|
|
|
- $goodnake =Db::name("good_nake")->where([["spuCode","=",$info['spuCode']],["is_del","=",0],"min_num","<=",
|
|
|
- $info['good_num']])->order("min_num desc")->find();
|
|
|
-
|
|
|
+ $goodnake =Db::name("good_nake")->where([["spuCode","=",$info['spuCode']],["is_del","=",0],["min_num","<=",
|
|
|
+ $info['good_num']]])->order("min_num desc")->find();
|
|
|
+ if($goodnake==false){
|
|
|
+ return error_show(1004,"未找到成本数据");
|
|
|
+ }
|
|
|
$cgdCode = makeNo("CG");
|
|
|
|
|
|
$cg =["cgdNo"=>$cgdCode,
|