Browse Source

Merge branch 'master' of ssh://git.dever.cc:10022/dever-product/churen

rabin 2 years ago
parent
commit
b7b543c637
1 changed files with 16 additions and 16 deletions
  1. 16 16
      tool/stats/lib/Manage.php

+ 16 - 16
tool/stats/lib/Manage.php

@@ -172,25 +172,25 @@ Class Manage
 	                }
 	                $ka = 0;
 	                $money = 0;
-	                 if ($v['status'] == 8 || $v1['status'] == 3) {
+	                 if ($v['status'] == 8 || $v['status'] == 6) {
 	                    $num = $v1['num'];
 	                    $refund_cash = $v1['price']*$v1['num'];
-	                    if ($v['refund_cash'] && $v['refund_cash']>0) {
-	                    	$money = $v['refund_cash'];
-	                    }
-	                    if ($v['card_code_cash'] && $v['card_code_cash'] >0) {
-	                    	$ka = $v['card_code_cash'];
+	                    if ($v['status'] == 8) {
+	                    	if ($v['refund_cash'] && $v['refund_cash']>0) {
+		                    	$money = $v['refund_cash'];
+		                    }
+		                    if ($v['card_code_cash'] && $v['card_code_cash'] >0) {
+		                    	$ka = $v['card_code_cash'];
+		                    }
+	                    } elseif ($v['status'] == 6) {
+	                    	if ($v['card_code_id'] && $v['card_code_id']>0 ) {
+	                    		$ka = $v['refund_cash'];
+	                    	} else {
+	                    		$money = $v['refund_cash'];
+	                    	}
 	                    }
-	                    // if ($v['card_code_cash'] && $v['card_code_cash'] >0) {
-	                    // 	if ($v['refund_cash'] <= $v['card_code_cash']) {
-	                    // 		$ka = $v['refund_cash'];
-	                    // 	} else {
-	                    // 		$ka = $v['card_code_cash'];
-	                    // 		$money = $v['refund_cash'] - $v['card_code_cash'];
-	                    // 	}
-	                    // }
-	                    // $refund = Dever::db('shop/sell_order_refund')->find(array('order_id'=>$v['id']));
-	                    // if ($refund)
+	                    
+	                    
 	                    $refund_status = '已退款';
 	                    $refund_cdate = '';
 	                    if ($v['shop_type'] == 1) {