Przeglądaj źródła

修改扫描标签 未判断库位的问题

lvhao 3 dni temu
rodzic
commit
8fde813dd1
1 zmienionych plików z 7 dodań i 2 usunięć
  1. 7 2
      core/CoreApp/controllers/Whlabel.php

+ 7 - 2
core/CoreApp/controllers/Whlabel.php

@@ -6617,11 +6617,16 @@ class Whlabel extends Start_Controller
 				echo json_encode(array('msg' => '没有此条码信息!', 'success' => false));
 				exit;
 			}
+			//处理一个bug 就是 需要根据标签的库位去进行 出库
+			$extra_where = "";
+			if(!empty($label['details'])){
+				$extra_where .= "  and details = '" . $label['details'] . "'";
+			}
 			$xzck = ($label['warehouse'] == '12') ? 'specialstock' : 'whlabel';
 			if (stripos($label['features'], '-126-') !== false) {
-				$ck = $this->$xzck->find_all("state = '0' and shop = '" . $label['shop'] . "' and number = '" . $label['number'] . "' and warehouse = '" . $label['warehouse'] . "' and ( zd = '' or zd is null )");
+				$ck = $this->$xzck->find_all("state = '0' and shop = '" . $label['shop'] . "' and number = '" . $label['number'] . "' and warehouse = '" . $label['warehouse'] . "' and ( zd = '' or zd is null ) ".$extra_where);
 			} else {
-				$ck = $this->$xzck->find_all("state = '0' and shop = '" . $label['shop'] . "' and number = '" . $label['number'] . "' and warehouse = '" . $label['warehouse'] . "' and purchase = '" . $label['purchase'] . "' and ( zd = '' or zd is null ) ");
+				$ck = $this->$xzck->find_all("state = '0' and shop = '" . $label['shop'] . "' and number = '" . $label['number'] . "' and warehouse = '" . $label['warehouse'] . "' and purchase = '" . $label['purchase'] . "' and ( zd = '' or zd is null ) ".$extra_where);
 			}
 			$j = 0;
 			if (count($ck) >= $num) {