📄 新单选新单设过滤条件.sql
字号:
/***练习如何在新单选新单设过滤条件(采购检验申请单和收料通知单) ***/
/***注意:给FCondition设条件不但在新单选老单时起作用,在老单下推新单时也起作用,而在新单的插件的beforeselbills写条件,则只有选单时才起作用****/
select * from icclasstype where fid>=200000000
select fcondition,* from icclasslink where fdestclasstypeid=200000001
----采购检验申请单和收料通知单能下推寄存入库单的条件是必须是审核过的,且是否寄存字段大于0,且没有钩稽完毕的才可,反之如寄存入库单选老单条件也是一样
update icclasslink set fcondition='v1.FCheckerID>0 and v1.FHeadSelfP0334>0 and u1.FauxQty>u1.FSecQty' where fdestclasstypeid=200000001 and fsourclasstypeid=-72
update icclasslink set fcondition='v1.FCheckerID>0 and v1.FHeadSelft0232>0 and u1.FauxQty>u1.FSecQty' where fdestclasstypeid=200000001 and fsourclasstypeid=-702
--select fconditionext,* from icclasstableinfo where fclasstypeid=200000001
--update icclasslink set fcondition='' where fdestclasstypeid=200000001 and fsourclasstypeid=-72
--update icclasslink set fcondition='' where fdestclasstypeid=200000001 and fsourclasstypeid=-702
update icclasstype set fid=fid
----寄存入库单下推到外购入库单的条件是必须审核过且没有钩稽完毕的,反之外购入库单选寄存入库单也是一样
update icclasslink set fcondition='isnull(t_Bos200000001.FCheckerID,0)>0 and t_Bos200000001entry2.FCommitQty>t_Bos200000001entry2.FFinishQty' where fsourclasstypeid=200000001 and fdestclasstypeid=-1
update icclasstype set fid=fid
select * from ictransactiontype where fid=72
select * from ictemplateentry where fid='P03'
/********输入仓库后,按仓库对应的仓库组过滤出对应的仓位********/
update ICClasstableinfo set FFilter='FSPGroupID = (SELECT FSPGroupID FROM t_Stock WHERE FItemID = GetFldValue(FDCStockID,1))' where FKey='FDCSPID' and FClassTypeID=200000001
---更新BOS缓存
update icclasstype set fid=fid
select * from icclasstype where fid>=200000000
select * from t_BOS200000001
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -