单据下推关系Sql
样例(仅供参考):
--查询(暂估应付 下推 财务应付)
select t1.FBILLNO,t2.FSEQ, yfz.FBILLNO,cwyf.FSEQ
from T_AP_PAYABLE t1 --应付单(暂估)
inner join T_AP_PAYABLEENTRY t2 on t1.FID = t2.FID--暂估应付.明细
inner join T_AP_PAYABLE_LK xt1 on xt1.FSID = t2.FENTRYID and xt1.FSBILLID=t2.FID and xt1.FSTABLENAME='T_AP_PAYABLEENTRY' --应付单(财务.关联关系)
inner join T_AP_PAYABLEENTRY cwyf on cwyf.FENTRYID = xt1.FENTRYID--财务应付.明细
inner join T_AP_PAYABLE yfz on yfz.FID = cwyf.FID--财务应付
--关联关系表(FSBILLID为上游单据编号,FSID为上游单据单据体entryID)
select * from T_SAL_OUTSTOCKENTRY_LK where FSBILLID=100080
--发货通知
select * from T_SAL_DELIVERYNOTICE where FID = 100080
select * from T_SAL_DELIVERYNOTICEENTRY where FID = 100080--fentryid = 100087
--销售出库
select * from T_SAL_OUTSTOCK where FID=100056
select * from T_SAL_OUTSTOCKENTRY where FID=100056
单据下推关系Sql
本文2024-09-16 17:28:41发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-15963.html