32.3、动态表单插件,打开动态表单,获取销售出库单列表的值,sql代码原创
18人赞赏了该文章
1.3万次浏览
编辑于2020年07月10日 13:34:38
续
业务场景:销售订单界面,获取销售出库单列表的值
1、
--销售出库单,单据体t1为主表,关联单据头t2 select * from T_SAL_OUTSTOCKENTRY t1 inner join T_SAL_OUTSTOCK t2 on t1.FID = t2.FID
2、
--取单据编号,物料编码,物料表T_BD_MATERIAL t3 select t2.FBILLNO,t3.FNUMBER from T_SAL_OUTSTOCKENTRY t1 inner join T_SAL_OUTSTOCK t2 on t1.FID = t2.FID left join T_BD_MATERIAL t3 on t1.FMATERIALID = t3.FMATERIALID
3、
--取物料名称, 物料名称表T_BD_MATERIAL_L t4 --多语言,取中文 FLOCALEID=2052 select t2.FBILLNO,t3.FNUMBER,t4.FNAME from T_SAL_OUTSTOCKENTRY t1 inner join T_SAL_OUTSTOCK t2 on t1.FID = t2.FID left join T_BD_MATERIAL t3 on t1.FMATERIALID = t3.FMATERIALID left join T_BD_MATERIAL_L t4 on t1.FMATERIALID = t4.FMATERIALID and t4.FLOCALEID=2052
4、
--取销售出库单,实发数量FREALQTY select t2.FBILLNO,t3.FNUMBER,t4.FNAME,t1.FREALQTY from T_SAL_OUTSTOCKENTRY t1 inner join T_SAL_OUTSTOCK t2 on t1.FID = t2.FID left join T_BD_MATERIAL t3 on t1.FMATERIALID = t3.FMATERIALID left join T_BD_MATERIAL_L t4 on t1.FMATERIALID = t4.FMATERIALID and t4.FLOCALEID=2052
5、
--取销售出库单,订单单号,在R拆分表 t5 select t2.FBILLNO,t3.FNUMBER,t4.FNAME,t1.FREALQTY,FSOORDERNO from T_SAL_OUTSTOCKENTRY t1 inner join T_SAL_OUTSTOCK t2 on t1.FID = t2.FID inner join T_SAL_OUTSTOCKENTRY_R t5 on t1.FENTRYID = t5.FENTRYID left join T_BD_MATERIAL t3 on t1.FMATERIALID = t3.FMATERIALID left join T_BD_MATERIAL_L t4 on t1.FMATERIALID = t4.FMATERIALID and t4.FLOCALEID=2052
总目录链接
https://vip.kingdee.com/article/64993872014591232
赞 18
18人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!