kis专业版修改下推或选单条件
-- 老单增加自定义项选单条件,就是在下推时显示【没有符合条件的记录】,或在下游单据选单时在序时薄界面默认过滤条件单自据,这里以销售订单下推生成发货通知为例
-- 步骤如下:
-- 1、要用到的数据表有
-- ICTransactionType 该表反映了供需链所有单据的总体情况
-- ICClassLink 单据转换流程整体信息
-- 2、在【ICTransactionType 】表中查询两个单据的【Fid】
select * from ICTransactionType where fname in ('销售订单','发货通知')
-- 3、在【ICClassLink 】表中查询销售订单下推、选单获取记录的条件以第二步查到的【FID】加上-号为条件
select * from ICClassLink where fsourclasstypeid=-81
-- 4、在【ICClassLink 】表中找到相对应下游据的【FCondition】字段,先备份一下原内容,再把自定义字段的条件加上,然后更新到该字段中
-- 原内容
IsNull(v1.FclassTypeID,0)<>1007100 AND v1.FStatus IN (1, 2) AND u1.FMrpClosed = 0 AND u1.FIsAltered = 0 AND u1.FQty>u1.FCommitQty AND v1.FSaleStyle<>20296 AND NOT (v1.FRelateBrID<>0 AND v1.FOrderAffirm<>1 AND ((v1.FPOOrdBillNo='' AND v1.FBrID=(SELECT CASE WHEN LTRIM(RTRIM(FValue))='' THEN 0 ELSE FValue END FROM t_SystemProfile WHERE FKey='BrID')) OR (v1.FPOOrdBillNo<>'' AND v1.FBrID<>(SELECT CASE WHEN LTRIM(RTRIM(FValue))='' THEN 0 ELSE FValue END FROM t_SystemProfile WHERE FKey='BrID'))))
-- 新增自定义字段后内容
IsNull(v1.FHeadSelfS0166,0)=0 AND IsNull(v1.FclassTypeID,0)<>1007100 AND v1.FStatus IN (1, 2) AND u1.FMrpClosed = 0 AND u1.FIsAltered = 0 AND u1.FQty>u1.FCommitQty AND v1.FSaleStyle<>20296 AND NOT (v1.FRelateBrID<>0 AND v1.FOrderAffirm<>1 AND ((v1.FPOOrdBillNo='' AND v1.FBrID=(SELECT CASE WHEN LTRIM(RTRIM(FValue))='' THEN 0 ELSE FValue END FROM t_SystemProfile WHERE FKey='BrID')) OR (v1.FPOOrdBillNo<>'' AND v1.FBrID<>(SELECT CASE WHEN LTRIM(RTRIM(FValue))='' THEN 0 ELSE FValue END FROM t_SystemProfile WHERE FKey='BrID'))))
kis专业版修改下推或选单条件
本文2024-09-16 19:39:30发表“kis知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-kis-30043.html