|
@@ -670,10 +670,7 @@ class OrderInv extends BaseController{
|
|
|
if ($status==""){
|
|
|
return error_show(1005,"参数 status 不能为空");
|
|
|
}
|
|
|
- $return_type = isset($this->post['return_type'])&&$this->post['return_type']!="" ? intval($this->post['return_type']):"";
|
|
|
- if ($return_type==""){
|
|
|
- return error_show(1005,"参数 return_type 不能为空");
|
|
|
- }
|
|
|
+
|
|
|
$remark =isset($this->post['remark'])&&$this->post['remark']!="" ? trim($this->post['remark']):"";
|
|
|
if($remark==""){
|
|
|
return error_show(1005,"参数 remark 不能为空");
|
|
@@ -699,7 +696,12 @@ class OrderInv extends BaseController{
|
|
|
if(empty($ticket)){
|
|
|
return error_show(1004,"未找到开票的票面信息");
|
|
|
}
|
|
|
- if($return_type==1){
|
|
|
+ $return_type = isset($this->post['return_type'])&&$this->post['return_type']!="" ? intval($this->post['return_type']):0;
|
|
|
+ if($status==1){
|
|
|
+ if ($return_type==""){
|
|
|
+ return error_show(1005,"参数 return_type 不能为空");
|
|
|
+ }
|
|
|
+ if($return_type==1){
|
|
|
$red =0;
|
|
|
if($ticket["inv_type"]=='004' || $ticket["inv_type"]=='028'){
|
|
|
$red =1;
|
|
@@ -709,8 +711,6 @@ class OrderInv extends BaseController{
|
|
|
$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']):"";
|
|
|
$checkCode =isset($this->post['checkCode'])&&$this->post['checkCode']!=''?trim($this->post['checkCode']):"";
|
|
|
-
|
|
|
-// $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']):"";
|
|
|
if($invCode==='') return error_show(1004,"参数 invCode 不能为空");
|
|
|
if($invNum==='') return error_show(1004,"参数 invNum 不能为空");
|
|
@@ -718,9 +718,10 @@ class OrderInv extends BaseController{
|
|
|
if($invinfo['inv_type']==2 || $invinfo['inv_type']==3){
|
|
|
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 不能为空");
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
Db::startTrans();
|
|
|
try{
|