wugg 2 years ago
parent
commit
8a9052edf0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/admin/controller/OrderInv.php

+ 2 - 2
app/admin/controller/OrderInv.php

@@ -536,7 +536,7 @@ class OrderInv extends BaseController{
         if($invinfo==false){
             return error_show(1004,"发票申请信息未找到");
         }
-        if($invinfo['status']!=3) return error_show(1004,"发票审核未完成");
+        if($invinfo['status']!=4) return error_show(1004,"发票审核未完成");
         $post_company =isset($this->post['post_company'])&&$this->post['post_company']!="" ? trim($this->post['post_company']):"";
         if($post_company==''){
             return error_show(1004,"参数 post_company 不能为空");
@@ -556,7 +556,7 @@ class OrderInv extends BaseController{
             ];
             $up =Db::name("invoice_pool")->where($invinfo)->update($data);
             if($up){
-                 $qrdArr=Db::name("assoc")->where(["viceCode"=>$invNo,"is_del"=>0])->column("id,orderCode,cancel_fee");
+                 $qrdArr=Db::name("assoc")->where(["viceCode"=>$invNo,"status"=>1,"is_del"=>0])->column("id,orderCode,cancel_fee");
                  if(!empty($qrdArr)){
                       foreach ($qrdArr as $value){
                           $qrdinfo =Db::name("qrd_info")->where(["sequenceNo"=>$value['orderCode']])->find();