金蝶K/3 仓存与总账对账,上月期末不等于下月期初

tlsoft 2月前 63


【问题描述】

仓存与总账对账有以下情况,可能是出现了账套的数据异常:

上月期末不等于下月期初;

本期发生没有差异,但是期末月的差异与期初余额的差异不相等;

仓存与总账对账的值和物料收发汇总表对不上;

物料收发汇总表不点调拨单数据后某月份期末不等于期初 。

【场景介绍】

如果有以上问题描述,可以先执行以下脚本进行检查:

1、检查调出金额和调入金额不一致的同价调拨单

select FBillNo,FDate,FPriceRef,FAuxPriceRef,FAmtRef, b.FAmount,b.FPrice,* 

from ICStockBillEntry b

join ICStockBill a on a.FInterID = b.FInterID 

where a.FTranType = 41 

and (b.FPriceRef <> b.FPrice or b.FAmtRef <> b.FAmount) 

and b.FDCStockID not in (select FItemID from t_Stock where FTypeID in (502,503) ) 

and  FRefType=12561

2、检查入库为虚仓且入库金额不为0的出入库单据

--调拨单

select FBillNo,FDate,FAmtRef,FPriceRef,FAuxPriceRef,b.FDCStockID,b.FSCStockID,FPrice,FAmount,FTranType,* 

from  ICStockBillEntry b

join ICStockBill a on a.FInterID = b.FInterID 

where b.FDCStockID in (select FItemID from t_Stock where FTypeID in (502,503) and FDeleted<>1) 

and ( FAmtRef<>0 or FPriceRef<>0 or FAuxPriceRef<>0) 

and FTranType=41

--非调拨单

select FBillNo,FDate,FAmtRef,FPriceRef,FAuxPriceRef,b.FDCStockID,b.FSCStockID,FPrice,FAmount,FTranType,* 

from  ICStockBillEntry b

join ICStockBill a on a.FInterID = b.FInterID 

where b.FDCStockID in (select FItemID from t_Stock where FTypeID in (502,503) and FDeleted<>1) 

and ( FPrice<>0 or famount<>0) 

and FTranType<>41

3、检查出库为虚仓且出库金额不为0的出入库单据

select FBillNo,FDate,FAmtRef,FPriceRef,FAuxPriceRef,b.FDCStockID,b.FSCStockID,FPrice,FAmount,FTranType,* 

from  ICStockBillEntry b

join ICStockBill a on a.FInterID = b.FInterID 

where  b.FSCStockID in (select FItemID from t_Stock where FTypeID in (502,503) and FDeleted<>1)

and (FPrice<>0 or FAmount<>0)

【解决方案】

上述脚本查出来的单据在前台查出来,反审核重新制单。

【注意事项】

本条知识针对特定的账套数据进行分析,并不代表相同的报错一定就是这个原因引发,相关的修复SQL也不适合直接使用,主要供读者参考,请读者根据实际情况具体分析。



最新回复 (0)
返回
发新帖