-
select
-
u1.FBillNo 单据编号,
-
u1.FDate 日期,
-
t3.FNumber as 供应商代码,
-
t3.FName as 供应商,
-
t4.FNumber 物料代码,
-
t4.FName 物料名称,
-
t4.FModel 物料规格,
-
t1.FQty 入库数量,
-
t1.FProcessPrice 加工单价,
-
t1.FProcessCost 加工费,
-
isnull(t2.FHookQty,0) 勾稽数量,
-
isnull(t2.FHookAmount,0) 勾稽金额
-
from ICStockBill u1
-
inner join ICStockBillEntry t1 on u1.FInterID=t1.FInterID
-
left join ICHookRelations t2 on t2.FIBInterID=t1.FInterID and t2.FEntryID=t1.FEntryID and u1.FTranType=t2.FTranType
-
left join t_Supplier t3 on t3.FItemID=u1.FSupplyID
-
left join t_ICItem t4 on t4.FItemID=t1.FItemID
-
where u1.FTranType=5 and u1.FCancellation=0
-
and u1.FHookStatus<>2 and t1.FQty<>ISNULL(t2.FHookQty,0)
-
order by t3.FNumber
金蝶K3 SQL报表系列-委外未勾稽明细表金蝶K3 SQL报表系列-委外未勾稽明细表
最新推荐文章于 2022-06-14 16:02:17 发布