浏览代码

修改warehouse

lvhao 1 月之前
父节点
当前提交
43bab0c5f8
共有 1 个文件被更改,包括 10 次插入6 次删除
  1. 10 6
      core/CoreApp/controllers/Warehouse.php

+ 10 - 6
core/CoreApp/controllers/Warehouse.php

@@ -435,12 +435,16 @@ class Warehouse extends Start_Controller {
 							$cc = explode(',',$cp);
 							$cc = explode(',',$cp);
 							if($v['id'] == '5')//美国仓提档检测是否有货
 							if($v['id'] == '5')//美国仓提档检测是否有货
 							{
 							{
-							    $xcc = $this->typeclass->read($cc[0]+1);
-							    if($xcc['classid'] == '14')
-							    {
-								    $tdnum = $this->str_replace_limit($cc[0],$xcc['id'],$num[0]);
-								    $tdwh = $this->whlabel->find_count("state = '0' and number = '$tdnum' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
-							    }
+								$tmp_cc = (int)$cc[0];
+								if($tmp_cc > 0){
+									$xcc = $this->typeclass->read($cc[0]+1);
+									if($xcc['classid'] == '14')
+									{
+										$tdnum = $this->str_replace_limit($cc[0],$xcc['id'],$num[0]);
+										$tdwh = $this->whlabel->find_count("state = '0' and number = '$tdnum' and warehouse = '".$v['id']."' and zd = '' and (shop IS NULL or shop = '' or shop like '%,".$shop.",%')");
+									}
+								}
+							    
 							    if($tdwh < $num[1])
 							    if($tdwh < $num[1])
 				                {
 				                {
 				        	        $tdxh += 1;//提前先加X不然出错,所以要减1
 				        	        $tdxh += 1;//提前先加X不然出错,所以要减1