问题现象: | 1、 存货年结后,期初出现很多只有金额没有数量的记录。后台发现,IA_Subsidiary和IA_ValuationAss 记录都不正确。(附上部分错误明细) 2、 在2011年有计价辅助工具重算后年结还是不正确。 数据已经上传到ftp:数据名称为:燕山威立雅 |
问题原因: | |
解决方案: | 您好, 此问题【经查看数据/测试】现做如下分析与答复: 【问题原因】 先进先出计价辅助表有错误,而结转数据时是根据计价辅助表结转数量的,所以年结后存货期初余额与上年结存不一致; 【解决方案】 1、用计价辅助表重算工具对2011年重算一下; 2、在查询分析器中针对2011年数据库执行下面脚本,将辅助计价表中2011年期初记录所对应的单据类型修改正确,然后再结转即可: update b set cinvoutype=isnull(a.csrcvoutype,a.cvoutype) from ia_subsidiary a inner join ia_valuationass b on a.id=b.inid where a.cvoutype='34' and isnull(a.csrcvoutype,a.cvoutype)<>b.cinvoutype update ia_subsidiary set cfree1=null where isnull(cfree1,'')='' update ia_subsidiary set cfree2=null where isnull(cfree2,'')='' update ia_subsidiary set cfree3=null where isnull(cfree3,'')='' update ia_subsidiary set cfree4=null where isnull(cfree4,'')='' update ia_subsidiary set cfree5=null where isnull(cfree5,'')='' update ia_subsidiary set cfree6=null where isnull(cfree6,'')='' update ia_subsidiary set cfree7=null where isnull(cfree7,'')='' update ia_subsidiary set cfree8=null where isnull(cfree8,'')='' update ia_subsidiary set cfree9=null where isnull(cfree9,'')='' update ia_subsidiary set cfree10=null where isnull(cfree10,'')='' 3、重新年结后,2012存货期初数量、金额与上年结存一致,期初余额中数量为空有金额的记录是因为存货科目不同,是正常的。结转时为了新年度的存货科目与上年存货科目金额一致,所以会按照存货科目进行结转,例如:2011年1#入库数量为10,金额为10,2#入库数量为3,金额为3,都生成凭证,存货科目为1401,出库数量为2,金额为2,未生成凭证,结转后,按入库明细结转,则2012年期初有两条记录:一条入库数量为8,金额为8,一条入库数量为3,金额为3,此时存货科目的金额为11,与上年的10+3=13不等,所以系统会自动补差,生成一条金额为2,存货科目为1401的记录,和一条金额为-2,存货科目为空的记录,使得期初余额与上年一致,存货科目期初也与上年存货科目结余一致; 【注意事项】修改前请务必做好数据备份;由于网站的关系,上述语句中如有标点符号' % + 必需在输入法为英文的状态下重新录入后再执行; |
相关补丁: | |
版本: | 8.90 |
模块: | 存货管理 |
产品: | 供应链 |
问题名称: | 威立雅--年节后有存货的数量没带过来 |
最后更新: | 2012-02-13 09:12:33 |