|
@@ -315,7 +315,7 @@ class OrderInv extends BaseController{
|
|
|
if($open_type==1)$status=3;
|
|
|
}
|
|
|
if($status==7){
|
|
|
- if(!in_array($invinfo['status'],[1,2,3,5,8])) return error_show(1004,"开票申请状态有误");
|
|
|
+ if(!in_array($invinfo['status'],[1,2,3,5,8,9])) return error_show(1004,"开票申请状态有误");
|
|
|
}
|
|
|
$update['status']=$status;
|
|
|
Db::startTrans();
|
|
@@ -850,7 +850,7 @@ class OrderInv extends BaseController{
|
|
|
];
|
|
|
$in = Db::name("invoice_ticket")->insert($invpool);
|
|
|
if($in==false){
|
|
|
- Db::rollback();
|
|
|
+ Db::rollback();
|
|
|
return error_show(1004,"发票信息添加失败");
|
|
|
}
|
|
|
}
|
|
@@ -1002,6 +1002,7 @@ class OrderInv extends BaseController{
|
|
|
$return['email']= $invinfo['email']??"";
|
|
|
$return['post_code']= $invinfo['post_code']??"";
|
|
|
$return['post_company']= $invinfo['post_company']??"";
|
|
|
+ $return['check_remark']= $invinfo['check_remark']??"";
|
|
|
$poolinfo = Db::name("invoice_pool_info")->where(["invNo"=>$return['invNo']])->find();
|
|
|
$return['buyer_title'] = $poolinfo['buyer_title']??'';
|
|
|
$return['buyer_title'] = $poolinfo['buyer_title']??'';
|
|
@@ -1023,9 +1024,13 @@ class OrderInv extends BaseController{
|
|
|
$return['ownerPlace'] = $poolinfo['ownerPlace']??'';
|
|
|
$orderList =Db::name("invoice_good")->where(["invNo"=>$return['invNo'],"is_del"=>0])->select()->toArray();
|
|
|
$return['goodList']=$orderList;
|
|
|
- $info =Db::name("invoice_ticket")->where(["invNo"=>$return['invNo'],"is_del"=>0,"type"=>0]) ->field("inv_number,inv_code,open_date")->find();
|
|
|
+ $info =Db::name("invoice_ticket")->where(["invNo"=>$return['invNo'],"is_del"=>0,"type"=>1]) ->field("inv_subtotal,inv_total,check_code,inv_number,inv_code,open_date")->find();
|
|
|
$return['inv_number']=$info['inv_number']??"";
|
|
|
$return['inv_code']=$info['inv_code']??"";
|
|
|
+ $return['open_date']=date("Y-m-d",strtotime($info['open_date']));
|
|
|
+ $return['inv_subtotal']=$info['inv_subtotal']??"";
|
|
|
+ $return['inv_total']=$info['inv_total']??"";
|
|
|
+ $return['check_code']=$info['check_code']??"";
|
|
|
if(!in_array($return['status'],[2,3,4,5])){
|
|
|
$opendate =$info['open_date']??"";;
|
|
|
if($opendate!=''){
|
|
@@ -1683,7 +1688,7 @@ class OrderInv extends BaseController{
|
|
|
if($num==''){
|
|
|
return error_show(1004,'参数 number 不能为空');
|
|
|
}
|
|
|
- $condition=[];
|
|
|
+ $condition=[["status","in",[0,1,2]],["type","=",0]];
|
|
|
$condition[]=["inv_number","=",$num];
|
|
|
$invNo = isset($this->post['invNo'])&&$this->post['invNo']!=''?trim($this->post['invNo']):"";
|
|
|
if($invNo!=='')$condition[]=["invNo","=",$invNo];
|