|
@@ -4,6 +4,7 @@ class Model_ck extends Lin_Model
|
|
|
function __construct(){
|
|
|
parent::__construct();
|
|
|
$this->load_table('setting');
|
|
|
+ $this->load->_model("Model_logic_ding","logic_ding");
|
|
|
}
|
|
|
public function get_kcyz($state,$warehouse,$shop,$number,$whlabel,$fpdata)//库存验证
|
|
|
{
|
|
@@ -140,8 +141,10 @@ class Model_ck extends Lin_Model
|
|
|
$wh = $this->whlabel->find_count("state = '0' and number = '$num[0]' and warehouse = '".$warehouse['id']."' and (zd = '$number' or zd = '') and (shop IS NULL or shop = '')");//通用
|
|
|
$shopwh = $this->whlabel->find_count("state = '0' and number = '$num[0]' and warehouse = '".$warehouse['id']."' and (zd = '$number' or zd = '') and shop like '%,".$shop.",%'");//专属
|
|
|
$x++;
|
|
|
+
|
|
|
if($wh+$shopwh < $num[1] || (isset($num[2]) && $num[2] == "DNOTO" && $warehouse['zdms'] == 2))
|
|
|
{
|
|
|
+ $this->logic_ding->sendToDing("库存验证数据【".$number."】".json_encode($num)."库存数量:".($wh+$shopwh)."仓库的占单模式".$warehouse['zdms']);
|
|
|
$save[] = $x-1;continue;//提前先加X不然出错,所以要减1
|
|
|
}
|
|
|
}
|