diff --git a/app/api/controller/FinanceInvoice.php b/app/api/controller/FinanceInvoice.php index ce968c1..b6ae7f8 100644 --- a/app/api/controller/FinanceInvoice.php +++ b/app/api/controller/FinanceInvoice.php @@ -12,6 +12,7 @@ namespace app\api\controller; use app\api\ApiController; use app\api\middleware\Auth; use app\finance\model\Invoice as InvoiceList; +use app\finance\model\InvoiceIncome; use app\finance\validate\InvoiceCheck; use think\exception\ValidateException; use think\facade\Db; @@ -494,9 +495,7 @@ class FinanceInvoice extends ApiController if (empty($param['id'])) { $this->apiError("id不能为空"); } - if (empty($param['check_status'])) { - $this->apiError("发票状态不能为空"); - } + $param['check_status'] = 10; if ($param['check_status'] == 10) { $count = InvoiceIncome::where(['inid'=>$param['id'],'status'=>1])->count(); if($count>0){ @@ -526,9 +525,6 @@ class FinanceInvoice extends ApiController } if (empty($param['id'])) { $this->apiError("id不能为空"); - } - if (empty($param['check_status'])) { - $this->apiError("发票状态不能为空"); } $param['check_status'] = 5; $param['update_time'] = time();