跳至主要內容

库存发货明细

五六零网校小于 1 分钟

代码示例

SELECT m1.seriesname AS '序列', T0.[DocNum] AS '单据编号', t0.groupnum AS '价格清单', t0.ref2 AS '生产订单号', T0.[DocDate] AS '过账日期'
	, T0.[TaxDate] AS '单据日期'
	,  T1.[ItemCode] AS '物料编号', T1.[Dscription] AS '物料/服务描述', oitB.ItmsGrpnam AS '物料组', T1.[Quantity] AS '数量'
	, t1.unitmsr AS '计量单位', t1.price AS '信息价格', t1.linetotal AS '总计', T1.[WhsCode] AS '仓库代码', T1.AcctCode AS '科目代码'
	, T1.OcrCode AS '部门', T1.OcrCode2 AS '人员', T0.Comments AS '备注'
FROM [dbo].[OIGE] T0
	INNER JOIN [dbo].[IGE1] T1 ON T1.[DocEntry] = T0.[DocEntry]
	JOIN NNM1 M1 ON M1.Series = T0.Series
	LEFT JOIN OITM ON T1.[ItemCode] = oitm.ItemCode
	INNER JOIN OITB ON OITB.itmsgrpcod = oitm.itmsgrpcod
WHERE (t1.docdate >= [%1%]
		OR t1.docdate = getdate())
	AND (t1.docdate <= [%2%]
		OR t1.docdate = getdate())