问题现象: |
在销售发票现结后,在应收中审核,审核后的单据在制单中选择现结制单中无法显示,也无法制单 |
问题原因: |
由于现结线索号重复导致,例如:200605BF00444发票的现结线索号为917193,与已经生成凭证的200605BF00420发票的现结线索号一致,导致审核时,没有向应收应付明细表写入200605BF00444发票的记录,所以制单时过滤不出200605BF00444发票,可以从下面查询看出: select bpayment,* from salebillvouch where csbvcode='200605BF00444' or csbvcode='200605BF00420' select * from ap_closebill where ccancelno='917193' select * from ap_detail where ccancelno='917193' |
解决方案: |
由于ap_detail表中没有记录,所以无法从应收中弃审,而发票对应的出库单已经记账,所以也不能弃结,请在查询分析器中针对错误帐套的06年度执行附件下面语句,将现结号重复的发票将审核人去除,并更改现结线索号、系统库中的现结最大号。 select distinct csbvcode,bpayment into tmpxj from salebillvouch a inner join salebillvouchs b on a.sbvid=b.sbvid left join ap_detail c on a.csbvcode=c.ccovouchid and a.bpayment=c.ccancelno where bpayment in ( select bpayment from salebillvouch where bpayment is not null group by bpayment having count(*)>1) and cclue is null and c.auto_id is null update a set cverifier=null from salebillvouch a inner join tmpxj b on a.csbvcode=b.csbvcode and a.bpayment=b.bpayment where a.bpayment is not null update a set bpayment=a.bpayment-900000 from salebillvouch a inner join tmpxj b on a.csbvcode=b.csbvcode and a.bpayment=b.bpayment where a.bpayment is not null update a set ccancelno=ccancelno-900000 from ap_closebill a inner join tmpxj b on a.ccovouchid=b.csbvcode and a.ccancelno=b.bpayment and cflag='ar' and cpzid is null and a.ccancelno is not null --更新ua_identity中现结标志号的值(cacc_id='600'中的帐套号600请改成实际的帐套号) update ufsystem..ua_identity set ifatherid=(select max(bpayment)+1 from salebillvouch where bpayment is not null), ichildid=(select max(bpayment) from salebillvouch where bpayment is not null) where cacc_id='600' and cvouchtype='xj' 执行完后,再对下面语句所查询出来的现结发票重新进行审核即可: select * from tmpxj 【友情提示】:04-7-7日应收应付模块曾经出过成批审核造成销售现结线索号重复的补丁arsql.exe/apsql.exe,请打上应收应付的补丁,以避免以后出现此问题。 |
相关补丁: |
|
版本: |
8.52 |
模块: |
应收 |
产品: |
U852--财务会计--应收款管理 |
问题名称: |
现结单据无法制单 |
最后更新: |
2006-08-14 00:00:00 |