标签:forderbillno 通知单 t2 t1 K3 fitemid 发货 fdate
集团部张**要求
报表的难点与痛点:
3.1、《发货通知单》----想了解还有多少没有发完或没有发货?
3.2、《调拨单--发货》----处理打包发货的数据:
3.3、《调拨单--退货》
常用的报表内容:
1、《发货通知单》--《调拨单》来明确有多少货没有发或已发:
2、报表的内码:
发货通知单:内码:
调拨单:内码:
发货通知单: seoutstock
fdate fempid fbillno fcheckdate
日期 业务员 单据编号 审核人
发货通知单分录:seoutstockentry
fentryid fitemid forderbillno forderentry fqty fauxcommitqty fstockqty
分录号 物料内码 订单编号 订单分录 数量 调拨出库数量 出库数量
调拨单:icstockbill -ftrantype='41'
fdate fbillno ftrantype ‘
日期 订单编号 单据类型-调拨单类型
调拨单分录内码:icstockbillentry
fentryid fitemid fqty forderbillno forderentry
分录号 物料内码 数量 订单编号 订单分录
----发货通知单信息
set nocount on
select a.fdate , a.fbillno , c.FName as fywname , b.fentryid ,b.fitemid , b.fqty , b.fcommitqty ,b.FOrderBillNo ,b.FOrderEntryID
into #tempT1
from seoutstock a
left join seoutstockentry b on b.finterid=a.finterid
left join t_Emp c on c.FItemID=a.fempid
where a.FCancellation='0' and a.fdate>='********' AND a.FDate<='########' and c.FName='张林伟'
ORDER BY A.FDate
select a.fbillno as fchgbillno, a.fdate as fchgdate ,
b.fitemid , b.forderbillno , b.FOrderEntryID
into #tempT2
from icstockbill a
left join icstockbillentry b on b.finterid=a.finterid
where a.ftrantype='41' and a.fdate>='********'
select a.fbillno as fddbillno , b.fentryid as fddentryid , b.fitemid ,b.fentryselfs0175
into #tempT3
from seorder a
left join seorderentry b on b.finterid=a.finterid
where a.FCancellation=0 and a.fdate>='********'
select t1.fdate , t1.fbillno ,
t1.fywname,
t1.fentryid,
t1.fitemid , d.fnumber ,d.fname,
t1.fqty ,t1.fcommitqty,
t2.fchgbillno ,t2.fchgdate,
t2.forderbillno,t3.fentryselfs0175
from #tempT1 t1
left join #tempT2 t2 ON T2.fitemid=t1.fitemid and t2.forderbillno=t1.forderbillno and t2.forderentryid=t1.forderentryid
left join #tempT3 t3 on t3.fitemid=t1.fitemid and t3.fddbillno=t1.forderbillno and t3.fddentryid=t2.forderentryid
left join t_icitem d on d.fitemid=t1.fitemid
order by t1.FDate ,t1.FBillNo
drop table #tempT1
drop table #tempT2
drop table #tempT3
标签:forderbillno,通知单,t2,t1,K3,fitemid,发货,fdate 来源: https://www.cnblogs.com/qiugy/p/12624397.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。