|
|
@@ -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) {
|