问题1:
小计不对,项目小计被算入别的现金流量项目小计下:
解决办法:大概率是现金流量项目的上下级关系错误,修复脚本如下:
1.SQLSERVER脚本:
UPDATE t0 SET t0.FPARENTID = t1.FID FROM T_GL_CASHFLOW t0 LEFT JOIN T_GL_CASHFLOW t1 ON t0.FNUMBER LIKE t1.FNUMBER + '%' AND t0.FLEVEL - 1 = t1.FLEVEL AND t0.FLEVEL > 2 AND t0.FCASHFLOWITEMTABLE = t1.FCASHFLOWITEMTABLE
UPDATE t0 SET t0.FPARENTID = 0 FROM T_GL_CASHFLOW t0 WHERE flevel = 2
2.ORACLE脚本:
UPDATE T_GL_CASHFLOW t0 SET t0.fparentid = (SELECT t1.fid FROM T_GL_CASHFLOW t1 WHERE t0.FNUMBER LIKE t1.FNUMBER || '%' AND t0.FLEVEL - 1 = t1.FLEVEL AND t0.FLEVEL > 2 AND t0.FCASHFLOWITEMTABLE = t1.FCASHFLOWITEMTABLE)
UPDATE T_GL_CASHFLOW t0 SET t0.fparentid = 0 WHERE flevel = 2
问题2:
显示错乱(自定义现金流量项目)
解决办法:先确认版本是否是7.3.1310.2以后版本(该版本增加了对自定义现金流量项目的支持),小计不对参照问题1
问题3:
联查结果和现金流量表显示结果不一致
解决办法:1先确认是否是存在初始数据,减掉初始数据后一致的话是正常的,2.使用流量检查功
问题4:
出现问题3,但是流量检查没毛病--可能是历史产品bug
解决办法:使用下面SQL可校验主表的所有错误问题,查询到的结果为有问题的凭证内码(T_GL_VOUCHER.FVOUCHERID)
SELECT FVOUCHERID FROM (SELECT T.FVOUCHERID FROM (SELECT A.FVOUCHERID AS FVOUCHERID, Sum(A.FAMOUNT * B.FDIRECTION) AS FAMOUNT FROM T_GL_CASHFLOWBAL A INNER JOIN T_GL_VOUCHER V ON A.FVOUCHERID = V.FVOUCHERID INNER JOIN T_GL_CASHFLOW B ON A.FITEMID = B.FID WHERE A.FITEMID <> 0 GROUP BY A.FVOUCHERID) T1 RIGHT JOIN (SELECT VE.FVOUCHERID, Sum(VE.FAMOUNT * VE.FDC) AS FAMOUNT FROM T_GL_VOUCHERENTRY VE INNER JOIN T_GL_VOUCHER V ON VE.FVOUCHERID = V.FVOUCHERID INNER JOIN T_BD_ACCOUNT C ON VE.FACCOUNTID = C.FACCTID WHERE ( C.FISCASH = '1' OR C.FISBANK = '1' OR C.FISCASHFLOW = '1' ) GROUP BY VE.FVOUCHERID) T ON T1.FVOUCHERID = T.FVOUCHERID WHERE ( Isnull(T.FAMOUNT, 0) - Isnull(T1.FAMOUNT, 0) ) <> 0) TV3
推荐阅读