销售出库报表
442次浏览
编辑于2018年04月26日 09:01:26
SELECT t1.FDate AS '日期',
t1.FBillNo as '单据号码',
t6.FNumber as'客户',
t6.FName as '客户名称',
t5.FinterID AS '产品名称',
t3.FHelpCode AS '产品长代码',
t3.FModel AS '规格型号',
t3.FUnitID AS '计量单位',
t2.FauxplanPrice as'单价',
t2.Fauxqty as'数量',
t5.FEntrySelfB0172 as'未出库数量',
t2.FAmount as '金额',
t5.FEntrySelfB0170 as '客户订单号',
t5.Fmapname AS '对应代码',
t5.Fmapnumber AS '对应名称'
FROM ICStockbill t1, ICStockBillEntry t2,t_ICItem t3,t_MeasureUnit t4, vwICBill_8 t5,t_Organization t6
WHERE t1.FInterID=t2.FInterID
and t5.finterID=t1.FInterID
AND t2.FItemID=t3.FItemID
AND t4.FItemID=t3.FUnitID
AND t4.FStandard=1
AND t1.FDate>='********'
and t1.FDate<='########'
AND t6.FNumber>='*CustNo*'
AND t6.FNumber<='#CustNo#'
t1.FBillNo as '单据号码',
t6.FNumber as'客户',
t6.FName as '客户名称',
t5.FinterID AS '产品名称',
t3.FHelpCode AS '产品长代码',
t3.FModel AS '规格型号',
t3.FUnitID AS '计量单位',
t2.FauxplanPrice as'单价',
t2.Fauxqty as'数量',
t5.FEntrySelfB0172 as'未出库数量',
t2.FAmount as '金额',
t5.FEntrySelfB0170 as '客户订单号',
t5.Fmapname AS '对应代码',
t5.Fmapnumber AS '对应名称'
FROM ICStockbill t1, ICStockBillEntry t2,t_ICItem t3,t_MeasureUnit t4, vwICBill_8 t5,t_Organization t6
WHERE t1.FInterID=t2.FInterID
and t5.finterID=t1.FInterID
AND t2.FItemID=t3.FItemID
AND t4.FItemID=t3.FUnitID
AND t4.FStandard=1
AND t1.FDate>='********'
and t1.FDate<='########'
AND t6.FNumber>='*CustNo*'
AND t6.FNumber<='#CustNo#'
推荐阅读