Your Name 2 år sedan
förälder
incheckning
eb2684ea68
1 ändrade filer med 31 tillägg och 17 borttagningar
  1. 31 17
      tool/stats/lib/Manage.php

+ 31 - 17
tool/stats/lib/Manage.php

@@ -191,7 +191,7 @@ Class Manage
 		                    	$ka = $v['card_code_cash'];
 		                    }
 	                    } elseif ($v['status'] == 6) {
-	                    	if ($v['card_code_id'] && $v['card_code_id']>0 ) {
+	                    	if ($v['card_code_id'] && $v['card_code_id'] >0) {
 	                    		$ka = $v['refund_cash'];
 	                    	} else {
 	                    		$money = $v['refund_cash'];
@@ -219,24 +219,38 @@ Class Manage
 		                if ($v['refund_status'] == 3 && $v1['status'] == 3) {
 		                	$refund_status = '有退款';
 		                	$refund_cash = $v1['num']*$v1['price'];
-		                	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;
-			                    }
+		                	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 {
-		                		if ($v['card_code_cash'] && $v['card_code_cash'] >0) {
-				                    	$ka = $v['refund_cash'];
-				                    } else {
-				                    	$money = $v['refund_cash'];
-				                    }
+		                		$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_cdate = '';
 		                    if ($v['shop_type'] == 1) {