|
@@ -16,7 +16,8 @@ class Customer extends BaseController
|
|
|
$post = $this->post;
|
|
|
$condition=[];
|
|
|
isset($post['company'])&&$post['company']!=""? $condition[]=['companyName|contactor',"like","%{$post['company']}%"] : "";
|
|
|
- isset($post['contactor'])&&$post['contactor']!=""? $condition[]=['contactor',"like","%{$post['contactor']}%"] :
|
|
|
+ isset($post['contactor'])&&$post['contactor']!=""? $condition[]=['contactor',"like","%{$post['contactor']}%"]
|
|
|
+ :"";
|
|
|
isset($post['companyNo'])&&$post['companyNo']!=""? $condition[]=['companyNo',"=",$post['companyNo']] :
|
|
|
"";
|
|
|
$page = isset($post['page'])&& $post['page']!="" ? intval($post['page']) :1;
|
|
@@ -233,9 +234,9 @@ class Customer extends BaseController
|
|
|
if($code==''){
|
|
|
return error_show(1004,"参数 invoice_code 不能为空");
|
|
|
}
|
|
|
- $isTrs =Db::name("customer_invoice")->where([["invoice_code","=",$code,"is_del","=",0],["id","<>",$id]])
|
|
|
- ->find();
|
|
|
- if($isTrs){
|
|
|
+ $isTrs =Db::name("customer_invoice")->where([["invoice_code","=",$code],["is_del","=",0],["id","<>",$id]])
|
|
|
+ ->findOrEmpty();
|
|
|
+ if(!empty($isTrs)){
|
|
|
return error_show(1004,"开票信息已存在");
|
|
|
}
|
|
|
$people = isset($this->post['invoice_people'])&&$this->post['invoice_people']!=''?trim($this->post['invoice_people']):"";
|