|
@@ -215,7 +215,7 @@ class OrderInv extends BaseController{
|
|
return error_show(1004,$e->getMessage());
|
|
return error_show(1004,$e->getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 0 待财务开票/待金税开票 1待财务审核 2待填写物流 3开票完成 4开票失败/开票驳回 5财务驳回 6退票 7金税开票中
|
|
|
|
|
|
+ // 0 待财务开票/待金税开票 1待财务审核 2待填写物流 3开票完成 4开票失败/开票驳回 5财务驳回 6退票 7金税开票中 8 电子票待确认
|
|
public function status(){
|
|
public function status(){
|
|
$invNo = isset($this->post['invNo'])&&$this->post['invNo']!=''?trim($this->post['invNo']):"";
|
|
$invNo = isset($this->post['invNo'])&&$this->post['invNo']!=''?trim($this->post['invNo']):"";
|
|
if($invNo==""){
|
|
if($invNo==""){
|
|
@@ -231,17 +231,12 @@ class OrderInv extends BaseController{
|
|
}
|
|
}
|
|
//open_type 1 金税开票 2 金税线下开票 3 线下开票
|
|
//open_type 1 金税开票 2 金税线下开票 3 线下开票
|
|
$open_type = isset($this->post['open_type'])&&$this->post['open_type']!==''?intval($this->post['open_type']):"";
|
|
$open_type = isset($this->post['open_type'])&&$this->post['open_type']!==''?intval($this->post['open_type']):"";
|
|
-
|
|
|
|
$remark = isset($this->post['remark'])&&$this->post['remark']!=''?trim($this->post['remark']):"";
|
|
$remark = isset($this->post['remark'])&&$this->post['remark']!=''?trim($this->post['remark']):"";
|
|
-
|
|
|
|
-// $invArr=isset($this->post['invArr'])&&!empty($this->post['invArr'])?$this->post['invArr']:[];
|
|
|
|
$invCode =isset($this->post['invCode'])&&$this->post['invCode']!=''?trim($this->post['invCode']):"";
|
|
$invCode =isset($this->post['invCode'])&&$this->post['invCode']!=''?trim($this->post['invCode']):"";
|
|
$invNum =isset($this->post['invNum'])&&$this->post['invNum']!=''?trim($this->post['invNum']):"";
|
|
$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']):"";
|
|
$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']):"";
|
|
$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']):"";
|
|
$checkCode =isset($this->post['checkCode'])&&$this->post['checkCode']!=''?trim($this->post['checkCode']):"";
|
|
-
|
|
|
|
if($status==1){
|
|
if($status==1){
|
|
if($open_type==='')return error_show(1004,"参数 open_type 不能为空");
|
|
if($open_type==='')return error_show(1004,"参数 open_type 不能为空");
|
|
if($open_type!=1){
|
|
if($open_type!=1){
|
|
@@ -251,13 +246,10 @@ class OrderInv extends BaseController{
|
|
if($invinfo['inv_type']==2 || $invinfo['inv_type']==3){
|
|
if($invinfo['inv_type']==2 || $invinfo['inv_type']==3){
|
|
if($checkCode==='') return error_show(1004,"参数 checkCode 不能为空");
|
|
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($subtotal_fee==='') return error_show(1004,"参数 subtotal_fee 不能为空");
|
|
-// if($total_fee!=$invinfo['inv_value'])return error_show(1004,"发票金额不足");
|
|
|
|
$status=7;
|
|
$status=7;
|
|
}else{
|
|
}else{
|
|
- $status=7;
|
|
|
|
|
|
+ $status=7;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$update=[
|
|
$update=[
|
|
@@ -281,6 +273,7 @@ class OrderInv extends BaseController{
|
|
"inv_total"=>0,
|
|
"inv_total"=>0,
|
|
"inv_subtotal"=>$subtotal_fee,
|
|
"inv_subtotal"=>$subtotal_fee,
|
|
"open_date"=>$open_date,
|
|
"open_date"=>$open_date,
|
|
|
|
+ 'pdfstream'=>'',
|
|
"item"=>'',
|
|
"item"=>'',
|
|
"status"=>0,
|
|
"status"=>0,
|
|
"addtime"=>date("Y-m-d H:i:s"),
|
|
"addtime"=>date("Y-m-d H:i:s"),
|
|
@@ -676,8 +669,6 @@ class OrderInv extends BaseController{
|
|
if ($return_type==""){
|
|
if ($return_type==""){
|
|
return error_show(1005,"参数 return_type 不能为空");
|
|
return error_show(1005,"参数 return_type 不能为空");
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
$remark =isset($this->post['remark'])&&$this->post['remark']!="" ? trim($this->post['remark']):"";
|
|
$remark =isset($this->post['remark'])&&$this->post['remark']!="" ? trim($this->post['remark']):"";
|
|
if($remark==""){
|
|
if($remark==""){
|
|
return error_show(1005,"参数 remark 不能为空");
|
|
return error_show(1005,"参数 remark 不能为空");
|
|
@@ -755,6 +746,7 @@ class OrderInv extends BaseController{
|
|
"inv_subtotal"=>$subtotal_fee,
|
|
"inv_subtotal"=>$subtotal_fee,
|
|
"open_date"=>$open_date,
|
|
"open_date"=>$open_date,
|
|
"item"=>'',
|
|
"item"=>'',
|
|
|
|
+ 'pdfstream'=>'',
|
|
"status"=>0,
|
|
"status"=>0,
|
|
"addtime"=>date("Y-m-d H:i:s"),
|
|
"addtime"=>date("Y-m-d H:i:s"),
|
|
"updatetime"=>date("Y-m-d H:i:s")
|
|
"updatetime"=>date("Y-m-d H:i:s")
|
|
@@ -1040,7 +1032,8 @@ class OrderInv extends BaseController{
|
|
$poolinfo['ownerPlace'] = $pool['ownerPlace']??'';
|
|
$poolinfo['ownerPlace'] = $pool['ownerPlace']??'';
|
|
$orderList =Db::name("invoice_good")->where(["invNo"=>$invNo,"is_del"=>0])->select()->toArray();
|
|
$orderList =Db::name("invoice_good")->where(["invNo"=>$invNo,"is_del"=>0])->select()->toArray();
|
|
$poolinfop['goodList']=$orderList;
|
|
$poolinfop['goodList']=$orderList;
|
|
- $poolinfop['invinfo']=Db::name("invoice_ticket")->where(["invNo"=>$invNo,"type"=>0,"is_del"=>0])->findOrEmpty();
|
|
|
|
|
|
+ $poolinfop['invinfo']=Db::name("invoice_ticket")->withoutField("pdfstream")->where(["invNo"=>$invNo,"type"=>0,"is_del"=>0])
|
|
|
|
+ ->findOrEmpty();
|
|
return app_show(0,"获取成功",$poolinfo);
|
|
return app_show(0,"获取成功",$poolinfo);
|
|
}
|
|
}
|
|
//退票列表
|
|
//退票列表
|
|
@@ -1537,7 +1530,7 @@ class OrderInv extends BaseController{
|
|
$condition[]=["inv_number","=",$num];
|
|
$condition[]=["inv_number","=",$num];
|
|
$invNo = isset($this->post['invNo'])&&$this->post['invNo']!=''?trim($this->post['invNo']):"";
|
|
$invNo = isset($this->post['invNo'])&&$this->post['invNo']!=''?trim($this->post['invNo']):"";
|
|
if($invNo!=='')$condition[]=["invNo","=",$invNo];
|
|
if($invNo!=='')$condition[]=["invNo","=",$invNo];
|
|
- $info =Db::name("invoice_ticket")->json(['item'])->where($condition)->findOrEmpty();
|
|
|
|
|
|
+ $info =Db::name("invoice_ticket")->json(['item'])->withoutField("pdfstream")->where($condition)->findOrEmpty();
|
|
if(!empty($info)&& isset($info['item'])){
|
|
if(!empty($info)&& isset($info['item'])){
|
|
array_walk($info['item'],function (&$value){
|
|
array_walk($info['item'],function (&$value){
|
|
$value['SL'] = ($value['SL']*100)."%";
|
|
$value['SL'] = ($value['SL']*100)."%";
|
|
@@ -1865,7 +1858,7 @@ class OrderInv extends BaseController{
|
|
$page= $page>$total ? intval($total):$page;
|
|
$page= $page>$total ? intval($total):$page;
|
|
$list=Db::name("invoice_return")->alias("a")
|
|
$list=Db::name("invoice_return")->alias("a")
|
|
->leftJoin("invoice_ticket b","a.invNo=b.invNo and b.type=1")
|
|
->leftJoin("invoice_ticket b","a.invNo=b.invNo and b.type=1")
|
|
- ->field("b.*,a.*")->json(["item"])->page($page,$size)->where($condition)->select()
|
|
|
|
|
|
+ ->field("b.*,a.*")->withoutField("pdfstream")->json(["item"])->page($page,$size)->where($condition)->select()
|
|
->toArray();
|
|
->toArray();
|
|
return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
}
|
|
}
|