Your Name 2 vuotta sitten
vanhempi
commit
46fc6160ad
1 muutettua tiedostoa jossa 14 lisäystä ja 43 poistoa
  1. 14 43
      tool/stats/lib/Manage.php

+ 14 - 43
tool/stats/lib/Manage.php

@@ -182,7 +182,7 @@ Class Manage
 	                $money = 0;
 	                 if ($v['status'] == 8 || $v['status'] == 6) {
 	                    $num = $v1['num'];
-	                    $refund_cash = $v1['price']*$v1['num'];
+	                    // $refund_cash = $v1['price']*$v1['num'];
 	                    if ($v['status'] == 8) {
 	                    	if ($v['refund_cash'] && $v['refund_cash']>0) {
 		                    	$money = $v['refund_cash'];
@@ -197,13 +197,6 @@ Class Manage
 	                    		$money = $v['refund_cash'];
 	                    	}
 	                    }
-	                    if ($k1 == 0) {
-	                    	$ka = $ka;
-	                    	$money = $money;
-	                    } else {
-	                    	$ka = 0;
-	                    	$money = 0;
-	                    }
 	                    
 	                    $refund_status = '已退款';
 	                    $refund_cdate = '';
@@ -218,40 +211,13 @@ Class Manage
 	                	#有退款的情况
 		                if ($v['refund_status'] == 3 && $v1['status'] == 3) {
 		                	$refund_status = '有退款';
-		                	$refund_cash = $v1['num']*$v1['price'];
-		                	if ($v['refund_cash'] && $v['refund_cash'] > 0) {
-		                		if ($v['card_code_id'] && $v['card_code_id'] >0) {
-		                    		$ka = $v['refund_cash'];
-		                    	} else {
-		                    		$money = $v['refund_cash'];
-		                    	}
-		                	}
-		                	if ($k1 == 0) {
-		                		$ka = $ka;
-		                		$money = $money;
-		                	} else {
-		                		$ka = 0;
-		                		$money = 0;
-		                	}
-		                	// if ($v['refund_cash']>$refund_cash) {
-		                	// 	if ($k1 == 0) {
-			                //     	if ($v['card_code_cash'] && $v['card_code_cash'] >0) {
-				               //      	$ka = $v['refund_cash'];
-				               //      } else {
-				               //      	$money = $v['refund_cash'];
-				               //      }
-			                //     }else {
-			                //     	$ka = 0;
-			                //     	$money = 0;
-			                //     }
-		                	// } else {
-		                	// 	if ($v['card_code_cash'] && $v['card_code_cash'] >0) {
-				               //      	$ka = $v['refund_cash'];
-				               //      } else {
-				               //      	$money = $v['refund_cash'];
-				               //      }
-		                	// }
-		                    
+		                	// $refund_cash = $v1['num']*$v1['price'];
+	                		if ($v['card_code_id'] && $v['card_code_id'] >0) {
+	                    		$ka = $v['refund_cash'];
+	                    	} else {
+	                    		$money = $v['refund_cash'];
+	                    	}
+		   
 		                    $refund_cdate = '';
 		                    if ($v['shop_type'] == 1) {
 		                    	$refund = Dever::db('shop/sell_order_refund')->find(array('order_id'=>$v['id']));
@@ -278,7 +244,9 @@ Class Manage
 	                    $card_code_cash = round($v['card_code_cash'],2);#礼品卡金额
 						$wallet_cash = round($v['wallet_cash'],2);#钱包金额
 						$discount_cash = round($v['discount_cash'],2);
-	                    
+	                    $refund_cash = $v['refund_cash'];
+	                    $ka = $ka;
+	                    $money = $money;
 	                } else {
 	                    $v['num'] = 0;
 	                    
@@ -288,6 +256,9 @@ Class Manage
 	                    $card_code_cash = 0;
 	                    $wallet_cash = 0;
 	                    $discount_cash = 0;
+	                    $refund_cash = 0;
+	                    $ka = 0;
+		                $money = 0;
 	                    
 	                }
 	                // print_R($v['price']);die;