解决方案: |
您的问题主要是因为数据升级,及以前产品对于按产品进行核销存在问题造成的。解决方法有两种:一是将产品核销方式从按产品进行核销改成按单据进行核销。二是在ap_detail表中根据相应单据的借方金额idamount和贷方金额icamount修改对应的发票子表标识ibvid。首先你先要将今年核销的发票有错,取消操作后删除付款单 04616599-600发票的付款单0000004273,0000004274 02671766发票对应0000005226付款单 0277831-2发票对应0000004214付款单 01076922发票对应0000004371付款单 06019334发票对应0000004573付款单 01620000发票对应0000005228付款单 00519689发票对应0000005247付款单 -------------------------------------- 下面是修改2004所做的接转到今年有错的。 update purbillvouchs set iTotal=iSum,ioritotal=iorisum from purbillvouch join purbillvouchs on purbillvouch.pbvid=purbillvouchs.pbvid where cpbvcode in('00044159','01066232','00929988-90','08674747','07605785') --------------------------------------- select ibvid,id,isum,itotal,icamount from purbillvouch join purbillvouchs on purbillvouch.pbvid=purbillvouchs.pbvid join ap_detail on ap_detail.ibvid=purbillvouchs.id where cpbvcode in('04616599-600','02671766','0277831-2','01076922','06019334','01620000','00519689') and cvouchtype in('01','02','03')and itotal<>icamount --------------------------------------------------------------------------------- 通过以上两步操作后您在考虑是否采用哪种方式解决。 |