Jelajahi Sumber

修改warehouse的678错误 估计是gift类造成的

lvhao 1 Minggu lalu
induk
melakukan
dd5eb3d685
1 mengubah file dengan 22 tambahan dan 19 penghapusan
  1. 22 19
      core/CoreApp/controllers/Warehouse.php

+ 22 - 19
core/CoreApp/controllers/Warehouse.php

@@ -679,33 +679,36 @@ class Warehouse extends Start_Controller {
 							// 180%货的,200、250如果有货,给提醒
 							if(stripos($cp,'-72-') !== false) //13*4  HD13*4
 							{
-								$cc1 = explode('-',trim($cc[1],'-'));
-								$newcp = '-';
-								foreach ($cc1 as $kk=>$vv)
-		   					    {
-									if($kk == 1)
-									{
-                					    $newcp .= $vv.'-'.$cc[0].'-';
-									}
-									else
-									{
-										$newcp .= $vv.'-';
+								if(isset($cc[1])){
+									$cc1 = explode('-',trim($cc[1],'-'));
+									$newcp = '-';
+									foreach ($cc1 as $kk=>$vv)
+									   {
+										if($kk == 1)
+										{
+											$newcp .= $vv.'-'.$cc[0].'-';
+										}
+										else
+										{
+											$newcp .= $vv.'-';
+										}
 									}
-            					}
-								$gpp = str_replace('-72-','-73-',$newcp);
+									$gpp = str_replace('-72-','-73-',$newcp);
 									$ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
 									if($ccxh >= $num[1])
-				                	{
-				        	        	$hdtx .= $v['title'].' - 200%密度有货;';
-							    	}
+									{
+										$hdtx .= $v['title'].' - 200%密度有货;';
+									}
 								
 							
 									$gpp2 = str_replace('-72-','-74-',$newcp);
 									$ccxh = $this->whlabel->find_count("state = '0' and features = '$gpp2' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");//通用
 									if($ccxh >= $num[1])
-				                	{
-				        	        	$hdtx .= $v['title'].' - 250%密度有货;';
-							    	}
+									{
+										$hdtx .= $v['title'].' - 250%密度有货;';
+									}
+								}
+							
 								
 								
 							}