问题现象: | 应付核销生成凭证不平 |
问题原因: | 问题分析:该供应商采购专用发票在ap_detail表中的数据与发票子表中的数据不一致 参照执行如下脚本,可以查询出在ap_detail表中与采购发票表体金额不对应的记录: select c.* from ap_detail c inner join (select a.cvencode,a.cPBVBillType,a.cPBVCode,b.* from purbillvouch a inner join purbillvouchs b on a.pbvid=b.pbvid where a.cPBVBillType in ('01','02') ) d on c.cdwcode=d.cvencode and c.ccovouchtype=d.cPBVBillType and c.ccovouchid=d.cPBVCode and c.ibvid=d.id and c.iCAmount<>d.isum where c.cflag='ap' and c.ccovouchtype in ('01','02') and c.cprocstyle=c.ccovouchtype |
解决方案: | --执行前,先取消全部的核销,否则无效。应付核销方式选择按单据 --3个语句分开执行,每次执行一个 create view temp2 as select ibvid,sum (icamount_f) as sum1, sum(icamount_f-idamount_f) as iamount_f,sum(icamount) as sum2,sum(icamount-idamount) as iamount from ap_detail where ccovouchtype like '0%' and iflag |
相关补丁: | |
版本: | 其他 |
模块: | 应付 |
产品: | U8应收应付 |
问题名称: | 应付核销生成凭证不平 |
最后更新: | 2006-02-14 00:00:00 |