查询批次台账与批次结存表不一样
- 浏览:1054 - 发布时间:2007-11-26 16:14:00.0
问题版本: |
57-用友通标准版10.2 |
问题模块: |
17-销售管理 |
所属行业: |
0-通用 |
问题状态: |
1-UU通注册用户 |
关 键 字: |
批次结存表 |
适用产品: |
57 |
补 丁 号: |
|
开放状态: |
0-UU通注册用户 |
原问题号: |
|
提交时间: |
2007-11-26 16:14:00 |
问题名称: |
查询批次台账与批次结存表不一样 |
问题现象: |
做销售发票.仓库编号03,货物编号302001,批次071031.换算率为0.02.结存数量为0.02,件数为106.结存数量和件数不符. 查询批次台账与批次结存表不一样. 批次结存表: 入库数量5.5,入库件数275.出库数量5.48,出库件数为169. 结存数量为0.02,件数为106. 批次台账:收入数量5.5,收入件数275. 出库数量1.78,出库件数为89结存为3.72,件数186 已做过测试:如果把所有销售单中该存货的记录删除,查询批次结存表中仍然有余额. |
原因分析: |
执行下面脚本,然后执行批次整理。造成此问题原因做过相关修改,打上?新补丁。 update rdrecords set cvouchcode=(select min(autoid) from rdrecords c where c.cinvcode=rdrecords.cinvcode and c.cbatch=rdrecords.cbatch and isnull(cvouchcode,0)=0) where autoid in(select b.autoid from rdrecords a,rdrecords b where a.autoid=b.cvouchcode and isnull(b.cvouchcode,0)<>0 and a.cinvcode<>b.cinvcode ) update salebillvouchs set ibatch=(select cvouchcode from rdrecords where rdrecords.isbsid=salebillvouchs.autoid) where autoid in( select b.autoid from rdrecords a,salebillvouchs b where a.autoid=b.ibatch and isnull(b.ibatch,0)<>0 and a.cinvcode<>b.cinvcode) 您好:请执行脚本执行下面脚本,然后执行批次整理。造成此问题原因做过相关修改,打上?新补丁。 update rdrecords set cvouchcode=(select min(autoid) from rdrecords c where c.cinvcode=rdrecords.cinvcode and c.cbatch=rdrecords.cbatch and isnull(cvouchcode,0)=0) where autoid in(select b.autoid from rdrecords a,rdrecords b where a.autoid=b.cvouchc |
解决方案: |
执行下面脚本,然后执行批次整理。造成此问题原因做过相关修改,打上?新补丁。 update rdrecords set cvouchcode=(select min(autoid) from rdrecords c where c.cinvcode=rdrecords.cinvcode and c.cbatch=rdrecords.cbatch and isnull(cvouchcode,0)=0) where autoid in(select b.autoid from rdrecords a,rdrecords b where a.autoid=b.cvouchcode and isnull(b.cvouchcode,0)<>0 and a.cinvcode<>b.cinvcode ) update salebillvouchs set ibatch=(select cvouchcode from rdrecords where rdrecords.isbsid=salebillvouchs.autoid) where autoid in( select b.autoid from rdrecords a,salebillvouchs b where a.autoid=b.ibatch and isnull(b.ibatch,0)<>0 and a.cinvcode<>b.cinvcode) 您好:请执行脚本执行下面脚本,然后执行批次整理。造成此问题原因做过相关修改,打上?新补丁。 update rdrecords set cvouchcode=(select min(autoid) from rdrecords c where c.cinvcode=rdrecords.cinvcode and c.cbatch=rdrecords.cbatch and isnull(cvouchcode,0)=0) where autoid in(select b.autoid from rdrecords a,rdrecords b where a.autoid=b.cvouchcode and isnull(b.cvouchcode,0)<>0 and a.cinvcode<>b.cinvcode ) update salebillvouchs set ibatch=(select cvouchcode from rdrecords where rdrecords.isbsid=salebillvouchs.autoid) where autoid in( select b.autoid from rdrecords a,salebillvouchs b where a.autoid=b.ibatch and isnull(b.ibatch,0)<>0 and a.cinvcode<>b.cinvcode) | |