|
@@ -2084,6 +2084,7 @@ class OrderInv extends BaseController{
|
|
|
if($value["inv_type"]===""){
|
|
|
return error_show(1005,"第".($key+1)."行缺少发票类型数据");
|
|
|
}
|
|
|
+ $invtype=array_search($value['inv_type'],$this->typename)??"";
|
|
|
if($value["inv_code"]==""){
|
|
|
return error_show(1005,"第".($key+1)."行缺少发票代码数据");
|
|
|
}
|
|
@@ -2098,6 +2099,10 @@ class OrderInv extends BaseController{
|
|
|
}
|
|
|
if($value["open_date"]==""){
|
|
|
return error_show(1005,"第".($key+1)."行缺少发票开票日期数据");
|
|
|
+ }
|
|
|
+ //电子票校验码必传
|
|
|
+ if($value["check_code"]=="" && in_array($invtype,["026","028"])){
|
|
|
+ return error_show(1005,"第".($key+1)."行缺少发票校验码数据");
|
|
|
}
|
|
|
!isset($total[$value['invNo']]) ? $total[$value['invNo']]['total']=0:"";
|
|
|
|
|
@@ -2109,7 +2114,7 @@ class OrderInv extends BaseController{
|
|
|
$temp['inv_number'] = $value['inv_number'];
|
|
|
$temp['inv_subtotal'] = $value['inv_subtotal'];
|
|
|
$temp['inv_total'] = $value['inv_total'];
|
|
|
- $temp['check_code'] = $value['check_code'];
|
|
|
+ $temp['check_code'] = $value['check_code']??"";
|
|
|
$temp['item'] = '';
|
|
|
$temp['pdfstream'] = '';
|
|
|
$temp['open_date'] = date("Y-m-d H:i:s",strtotime($value['open_date']));
|