|
@@ -889,8 +889,8 @@ class OrderInv extends BaseController{
|
|
|
}
|
|
|
$update =[
|
|
|
"winv_fee"=>$qrdinfo['winv_fee']+$value['cancel_fee'],
|
|
|
- "inv_fee"=>$qrdinfo['inv_fee']-$value['cancel_fee'],
|
|
|
- "inv_status"=>$qrdinfo['ainv_fee']==0 &&$qrdinfo['inv_fee']-$value['cancel_fee']==0 ? 1 : 2,
|
|
|
+ "ainv_fee"=>$qrdinfo['ainv_fee']-$value['cancel_fee'],
|
|
|
+ "inv_status"=>$qrdinfo['inv_fee']==0 &&$qrdinfo['ainv_fee']-$value['cancel_fee']==0 ? 1 : 2,
|
|
|
"status"=>$qrdinfo['ainv_fee']==0 &&$qrdinfo['inv_fee']-$value['cancel_fee']==0&&$qrdinfo['pay_status']==1 ?0 : 1,
|
|
|
"updatetime"=>date("Y-m-d H:i:s"),
|
|
|
];
|
|
@@ -1707,7 +1707,7 @@ class OrderInv extends BaseController{
|
|
|
if($num==''){
|
|
|
return error_show(1004,'参数 number 不能为空');
|
|
|
}
|
|
|
- $condition=[["status","in",[0,1,2]],["type","=",0]];
|
|
|
+ $condition=[["status","in",[0,1,2]]];
|
|
|
$condition[]=["inv_number","=",$num];
|
|
|
$invNo = isset($this->post['invNo'])&&$this->post['invNo']!=''?trim($this->post['invNo']):"";
|
|
|
if($invNo!=='')$condition[]=["invNo","=",$invNo];
|
|
@@ -1850,7 +1850,7 @@ class OrderInv extends BaseController{
|
|
|
throw new \Exception($result['ZTXX'], 10006);
|
|
|
}
|
|
|
$up =Db::name("invoice_red")->insert($data);
|
|
|
- if($up) return app_show(0,"红冲发票申请新建成功",["invRed"=>$invRed]);
|
|
|
+ if($up) return ["code"=>0,"message"=>"红冲发票申请新建成功","invRed"=>$invRed];
|
|
|
else throw new \Exception($result['ZTXX'], 1006);
|
|
|
}
|
|
|
/**
|
|
@@ -1979,7 +1979,7 @@ class OrderInv extends BaseController{
|
|
|
if($upred==false){
|
|
|
throw new Exception("红冲提交失败",1006);
|
|
|
}
|
|
|
- return app_show(0,"红冲已提交",["invRed"=>$invRed]);
|
|
|
+ return ["code"=>0,"message"=>"红冲申请提交成功","invRed"=>$invRed];
|
|
|
}
|
|
|
|
|
|
private function addDiscard($ticket=[],$returnCode){
|
|
@@ -1990,7 +1990,7 @@ class OrderInv extends BaseController{
|
|
|
Db::name("invoice_return")->where(['returnCode'=>$returnCode])->update(["status"=>2,"updatetime"=>date("Y-m-d H:i:s")]);
|
|
|
$up =Db::name("invoice_pool")->where(['invNo'=>$ticket['invNo']])->update(["status"=>6,"updatetime"=>date("Y-m-d H:i:s")]);
|
|
|
if($up){
|
|
|
- return app_show(0,"发票废弃成功");
|
|
|
+ return ["code"=>0,"message"=>"发票废弃成功"];
|
|
|
}
|
|
|
}else{
|
|
|
throw new \Exception($result['ZTXX'], 1006);
|