用友U8 821版本应付管理模块,核销制单后生成的凭证借贷方不平。用友U8 821版本应付管理模块,核销制单后生成的凭证借贷方不平。
问题原因:供应商00786210发票采购专用发票在ap_detail表中的数据与发票子表中的数据不一致,参照执行如下脚本即可查出: select * from ap_detail where cdwcode='1701' and cflag='ap' and ccovouchid like '00786210' select b.* from purbillvouch a inner join purbillvouchs b on a.pbvid=b.pbvid where a.cPBVCode='00786210' and a.cPBVBillType='01' 核销时系统是根据采购发票上子表的记录生成ap_detail表中核销业务记录的(cprocstyle='9p'),核销制单时系统也是根据该记录生成应付账款借方金额的,该金额与付款单金额并不一致,所以造成了制单时借贷不平。 解决方法:请检查用户实际业务,判断是采购入库单表体记录错了,还是ap_detail表中对应的记录错了,然后删除或增加错误一方的记录。如果是06年度的采购发票出现该现象,则可取消发票审核、删除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 注意做好数据备份!!
解决方案:
问题原因:供应商00786210发票采购专用发票在ap_detail表中的数据与发票子表中的数据不一致,参照执行如下脚本即可查出: select * from ap_detail where cdwcode='1701' and cflag='ap' and ccovouchid like '00786210' select b.* from purbillvouch a inner join purbillvouchs b on a.pbvid=b.pbvid where a.cPBVCode='00786210' and a.cPBVBillType='01' 核销时系统是根据采购发票上子表的记录生成ap_detail表中核销业务记录的(cprocstyle='9p'),核销制单时系统也是根据该记录生成应付账款借方金额的,该金额与付款单金额并不一致,所以造成了制单时借贷不平。 解决方法:请检查用户实际业务,判断是采购入库单表体记录错了,还是ap_detail表中对应的记录错了,然后删除或增加错误一方的记录。如果是06年度的采购发票出现该现象,则可取消发票审核、删除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 注意做好数据备份!!
www.kuaiji66.com 天龙瑞德