|
@@ -435,12 +435,16 @@ class Warehouse extends Start_Controller {
|
|
|
$cc = explode(',',$cp);
|
|
|
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])
|
|
|
{
|
|
|
$tdxh += 1;//提前先加X不然出错,所以要减1
|