|
@@ -1015,7 +1015,13 @@ class Payment extends BaseController
|
|
|
if(!isset($item['invNumber'])||$item['invNumber']=='') return error_show(1004,"参数 invNumber 不能为空");
|
|
|
if(!isset($item['invoiceType'])||$item['invoiceType']=='') return error_show(1004,"参数 invoiceType 不能为空");
|
|
|
if(!isset($item['open_time'])||$item['open_time']=='') return error_show(1004,"参数 open_time 不能为空");
|
|
|
+
|
|
|
if(!isset($item['subtotal_amount'])||$item['subtotal_amount']=='') return error_show(1004,"参数 subtotal_amount 不能为空");
|
|
|
+ $invamount=0;
|
|
|
+ if(in_array($item['invoiceType'],['fully_digitalized_special_electronic','fully_digitalized_normal_electronic'])){
|
|
|
+ $invamount = $item['subtotal_amount']??0;
|
|
|
+ $item['subtotal_amount']=0;
|
|
|
+ }
|
|
|
//普票需要校验码
|
|
|
if(in_array($item['invoiceType'],['normal','roll',"toll",'electronic'])){
|
|
|
if(!isset($item['checkNumber'])||$item['checkNumber']=='') return error_show(1004,"参数 checkNumber 不能为空");
|
|
@@ -1037,6 +1043,7 @@ class Payment extends BaseController
|
|
|
"apply_name"=>$this->uname,
|
|
|
"inv_fee"=> 0,//核算金额
|
|
|
"inv_subtotal_amount"=> $item['subtotal_amount']??0, //票面金额
|
|
|
+ "inv_amount"=> $invamount, //票面金额
|
|
|
"invType"=> $item['invType'],
|
|
|
"invoiceType"=>$item['invoiceType']??"",
|
|
|
"inv_img"=>$item['inv_img']??'',
|
|
@@ -1133,7 +1140,11 @@ class Payment extends BaseController
|
|
|
|
|
|
if (!isset($payinfo[$item['payNo']])) throw new Exception('对账单数据未找到');
|
|
|
if ($payinfo[$item['payNo']]['status'] != 2) throw new Exception('对账单数据未完成审核');
|
|
|
-
|
|
|
+ $invamount=0;
|
|
|
+ if(in_array($item['invoiceType'],['fully_digitalized_special_electronic','fully_digitalized_normal_electronic'])){
|
|
|
+ $invamount = $item['inv_subtotal_amount']??0;
|
|
|
+ $item['inv_subtotal_amount']=0;
|
|
|
+ }
|
|
|
$hpNo = makeNo('hp');
|
|
|
$da_insert[] = [
|
|
|
'payNo' => $item['payNo'],
|
|
@@ -1142,6 +1153,7 @@ class Payment extends BaseController
|
|
|
'apply_name' => $this->uname,
|
|
|
'inv_fee' => 0,//核算金额
|
|
|
'inv_subtotal_amount' => $item['inv_subtotal_amount'] ?? 0, //票面金额
|
|
|
+ 'inv_amount' => $invamount, //票面金额
|
|
|
'invType' => 1,
|
|
|
'invoiceType' => $item['invoiceType'],
|
|
|
'inv_img' => '',
|