|
@@ -240,6 +240,7 @@ class OrderInv extends BaseController{
|
|
|
$open_date =isset($this->post['open_date'])&&$this->post['open_date']!=''?trim($this->post['open_date']):"";
|
|
|
// $total_fee =isset($this->post['total_fee'])&&$this->post['total_fee']!=''?floatval($this->post['total_fee']):"";
|
|
|
$subtotal_fee =isset($this->post['subtotal_fee'])&&$this->post['subtotal_fee']!=''?floatval($this->post['subtotal_fee']):"";
|
|
|
+ $checkCode =isset($this->post['checkCode'])&&$this->post['checkCode']!=''?trim($this->post['checkCode']):"";
|
|
|
|
|
|
if($status==1){
|
|
|
if($open_type==='')return error_show(1004,"参数 open_type 不能为空");
|
|
@@ -247,6 +248,10 @@ class OrderInv extends BaseController{
|
|
|
if($invCode==='') return error_show(1004,"参数 invCode 不能为空");
|
|
|
if($invNum==='') return error_show(1004,"参数 invNum 不能为空");
|
|
|
if($open_date==='') return error_show(1004,"参数 open_date 不能为空");
|
|
|
+ if($invinfo['inv_type']==2 || $invinfo['inv_type']==3){
|
|
|
+ if($checkCode==='') return error_show(1004,"参数 checkCode 不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
// if($total_fee==='') return error_show(1004,"参数 tatal_fee 不能为空");
|
|
|
if($subtotal_fee==='') return error_show(1004,"参数 subtotal_fee 不能为空");
|
|
|
// if($total_fee!=$invinfo['inv_value'])return error_show(1004,"发票金额不足");
|
|
@@ -267,12 +272,12 @@ class OrderInv extends BaseController{
|
|
|
$invup =Db::name("invoice_pool")->where($invinfo)->update($update);
|
|
|
if($invup){
|
|
|
if($status==7&& $open_type!=1){
|
|
|
-
|
|
|
$invpool=[
|
|
|
"invNo"=>$invinfo['invNo'],
|
|
|
- "inv_type"=>$open_type,
|
|
|
+ "inv_type"=>invoiceType($invinfo['inv_type']),
|
|
|
"inv_code"=>$invCode,
|
|
|
"inv_number"=>$invNum,
|
|
|
+ "check_code"=>$checkCode,
|
|
|
"inv_total"=>0,
|
|
|
"inv_subtotal"=>$subtotal_fee,
|
|
|
"open_date"=>$open_date,
|
|
@@ -675,11 +680,16 @@ class OrderInv extends BaseController{
|
|
|
$invCode =isset($this->post['invCode'])&&$this->post['invCode']!=''?trim($this->post['invCode']):"";
|
|
|
$invNum =isset($this->post['invNum'])&&$this->post['invNum']!=''?trim($this->post['invNum']):"";
|
|
|
$open_date =isset($this->post['open_date'])&&$this->post['open_date']!=''?trim($this->post['open_date']):"";
|
|
|
+ $checkCode =isset($this->post['checkCode'])&&$this->post['checkCode']!=''?trim($this->post['checkCode']):"";
|
|
|
+
|
|
|
// $total_fee =isset($this->post['total_fee'])&&$this->post['total_fee']!=''?floatval($this->post['total_fee']):"";
|
|
|
$subtotal_fee =isset($this->post['subtotal_fee'])&&$this->post['subtotal_fee']!=''?floatval($this->post['subtotal_fee']):"";
|
|
|
if($invCode==='') return error_show(1004,"参数 invCode 不能为空");
|
|
|
if($invNum==='') return error_show(1004,"参数 invNum 不能为空");
|
|
|
if($open_date==='') return error_show(1004,"参数 open_date 不能为空");
|
|
|
+ if($invinfo['inv_type']==2 || $invinfo['inv_type']==3){
|
|
|
+ if($checkCode==='') return error_show(1004,"参数 checkCode 不能为空");
|
|
|
+ }
|
|
|
// if($total_fee==='') return error_show(1004,"参数 tatal_fee 不能为空");
|
|
|
if($subtotal_fee==='') return error_show(1004,"参数 subtotal_fee 不能为空");
|
|
|
}
|
|
@@ -704,9 +714,11 @@ class OrderInv extends BaseController{
|
|
|
}else{
|
|
|
$invpool=[
|
|
|
"invNo"=>$invinfo['invNo'],
|
|
|
+ "type"=>1,
|
|
|
"inv_type"=>$ticket['inv_type'],
|
|
|
"inv_code"=>$invCode,
|
|
|
"inv_number"=>$invNum,
|
|
|
+ "check_code"=>$checkCode,
|
|
|
"inv_total"=>0,
|
|
|
"inv_subtotal"=>$subtotal_fee,
|
|
|
"open_date"=>$open_date,
|