用友软件免费下载(www.bbsufida.com)旨在提供全系列最新最全的用友财务软件免费下载地址,快速下载请添加微信 yyrjgls

用友软件库存帐与货位帐对账不平-用友T3

admin2016-04-19362用友T3货位入库存货

用友软件库存帐与货位帐对账不平

微信号:yyrjlls
技术咨询,有偿服务!
复制微信号
库存帐与货位帐对账不平

原因分析:经查询可分三种情况:1、出入库单与货位表相关联时,出入库单中存货数量不等于货位表中存货的数量;2、存在(货位仓中单据未审核、或者货位仓中单据已审核且不是存货期初),并且出入库单中并没有录入货位;3、存货并没有发生出入库业务,但货位表中却记录了存货的出入库货位信息

问题解答:可以通过库存--业务处理--库存帐与货位帐对账功能查询出所有有问题存货,这些有问题的存货可通过下面的脚本定位到错误单据。脚本如下:select * from (select rd.cvouchtype,rd.cBusType,rd.cWhCode,rd.dDate,rd.cCode,brdflag,chandler,rds.AutoID,rds.cInvCode,rds.iQuantity as 出入库数量,cp.iQuantity as 货位记录数量,rds.cBatch,rds.cFree1,rds.cfree2,rds.cFree3,rds.cPosition from rdrecord rd inner join RdRecords rds on rd.ID=rds.ID inner join (select cwhcode,cinvcode,RdsID,cBatch,cfree1,cfree2,cFree3,sum(iquantity) as iquantity from invposition group by cwhcode,cinvcode,RdsID,cBatch,cfree1,cfree2,cFree3) cp on rds.AutoID=cp.RdsID where rds.iQuantity<>cp.iQuantity union select cvouchtype,cbustype,a.cWhCode,dDate,cCode,bRdFlag,chandler,AutoID,cInvCode,iQuantity as 出入库数量,0 as 货位记录数量,cBatch,cFree1,cFree2,cfree3,cPosition from rdrecord a inner join rdrecords b on a.id=b.id left join warehouse c on a.cWhCode=c.cWhCode where bwhpos=1 and (cHandler is null or cHandler='' or (cHandler is not null and cHandler<>'' and biafirst=0)) and AutoID not in (select rdsid from InvPosition where cSource is null) union select '无出入库但有货位记录,可直接在InvPosition找到此数据删除即可' as cvouchtype,'' as cbustype,cwhcode,ddate,'' as ccode,brdflag,chandler,rdsid,cinvcode,iquantity as 出入库数量,0 as 货位记录数量,cBatch,cFree1,cFree2,cfree3,cPosCode from InvPosition where cSource is null and rdsid not in (select autoid from rdrecord a inner join rdrecords b on a.id=b.id left join warehouse c on a.cWhCode=c.cWhCode where bwhpos=1 )) a order by cinvcode,cwhcode,cbatch,cfree1,cfree2,cfree3--原理:1、rdrecord与invposition表管理查询出rds中记录的数据与invposition表中记录的数据不等的存货;--2、查询出(货位仓中单据未审核、或者货位仓中单据已审核且不是存货期初)、且未在货位表中找到记录的单据;--3、查询出无出入库单据但有货位记录的错误数据(注意:已排除货位调拨的情况);针对第三种可以通过脚本解决,解决方案:直接在数据库中删除第三种情况的数据:--首先备份这部分数据select * into tempdb..InvPosition_152556_2013bak from InvPosition where cSource is null and rdsid not in (select autoid from rdrecord a inner join rdrecords b on a.id=b.id left join warehouse c on a.cWhCode=c.cWhCode where bwhpos=1 )--删除这部分数据delete from InvPosition where cSource is null and rdsid not in (select autoid from rdrecord a inner join rdrecords b on a.id=b.id left join warehouse c on a.cWhCode=c.cWhCode where bwhpos=1 )后期关于货位表与库存对账的问题,均可通过上述方法解决。

本文链接:https://www.bbsufida.com/t3/7341.html

热门文章
侧栏广告位
随机文章