用友通年度结转后,发现存货的期初余额与库存的期初余额不一样 用友通年度结转后,发现存货的期初余额与库存的期初余额不一样
年度结转后,发现存货的期初余额与库存的期初余额不一样,怎样才能调整存货期初和库存的期初一样。数据库表数据有问题,需要执行一下数据库脚本。执行一下这个脚本,执行前备份好帐套,执行后核对数据。
delete St_Totalaccount where iMonth=1 insert into St_Totalaccount(cWhCode,
cInvCode,cBatch,cFree1,cFree2,iBeginQuantity,iMonth) select cWhCode,cInvCode,
cBatchCode,cFree1,cFree2,SUM(ISNULL(iAInQuantity,0)-ISNULL(iAOutQuantity,0)),1 from
IA_Subsidiary where iMonth = ’0′ group by cWhCode,cInvCode,cBatchCode,cFree1,cFree2
order by cInvcode
修改后
delete St_Totalaccount where iMonth=1
insert into St_Totalaccount(cWhCode,
cInvCode,cBatch,cFree1,cFree2,iBeginQuantity,iMonth) select cWhCode,cInvCode,
cBatchCode,cFree1,cFree2,SUM(ISNULL(iAInQuantity,0)-ISNULL(iAOutQuantity,0)),1 from
IA_Subsidiary where iMonth = ’0′and cvoutype=’34′ group by cWhCode,cInvCode,cBatchCode,cFree1,cFree2
order by cInvcode
此脚本一般是针对核算和库存模块数量数量对不上的情况,按照核算模块修改库存的现存量。如有其它问题,请联系在线客服咨询。用友云基地