出库单下推应付单出错
1,053次浏览
编辑于2013年07月25日 14:46:54
如下SQL语句搜索出有关联数据:
SELECT T1.FBASICUNITQTY,T2.FPRICEQTY,T2.FENTRYID,T3.FBILLNO,T3.FID
FROM T_AP_PAYABLE_LK T1
INNER JOIN T_AP_PAYABLEENTRY T2 ON T1.FENTRYID=T2.FENTRYID
INNER JOIN T_AP_PAYABLE T3 ON T3.FID=T2.FID
WHERE T1.FSID in(
select T2.FENTRYID
from t_STK_InStock T1
INNER JOIN T_STK_INSTOCKENTRY T2 ON T1.FID=T2.FID
where FBILLNO='CR1306070025'
)
and FRULEID='AP_InStockToPayableMap'
但是点击下推按钮提示没有下游单据
SELECT T1.FBASICUNITQTY,T2.FPRICEQTY,T2.FENTRYID,T3.FBILLNO,T3.FID
FROM T_AP_PAYABLE_LK T1
INNER JOIN T_AP_PAYABLEENTRY T2 ON T1.FENTRYID=T2.FENTRYID
INNER JOIN T_AP_PAYABLE T3 ON T3.FID=T2.FID
WHERE T1.FSID in(
select T2.FENTRYID
from t_STK_InStock T1
INNER JOIN T_STK_INSTOCKENTRY T2 ON T1.FID=T2.FID
where FBILLNO='CR1306070025'
)
and FRULEID='AP_InStockToPayableMap'
但是点击下推按钮提示没有下游单据
推荐阅读