-- 老单增加自定义项选单条件,就是在下推时显示【没有符合条件的记录】,或在下游单据选单时在序时薄界面默认过滤条件单自据,这里以销售订单下推生成发货通知为例
-- 步骤如下:
-- 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'))))
K3 wise 老单增加自定义项为下推或上拉【选单条件】
最新推荐文章于 2023-06-08 16:15:31 发布
这篇博客详细介绍了如何在供应链管理系统中,针对销售订单下推生成发货通知时,添加自定义筛选条件。通过查询`ICTransactionType`和`ICClassLink`表,修改`FCondition`字段的内容,将自定义字段`FHeadSelfS0166`加入过滤规则,确保在下推过程中只显示符合条件的记录。
摘要由CSDN通过智能技术生成