解决方案: |
请从支持网站下载并安装U851应收应付最新补丁,以避免日后出现类似问题。然后在当前年度库中参照执行如下脚本进行已经错误数据的修复即可: update ap_detail set cDeptCode=cdepcode from ap_detail inner join ap_closebills on ap_detail.icoclosesid=ap_closebills.id where cDeptCode is null update ap_detail set cDeptCode=salebillvouch.cdepcode from ap_detail inner join salebillvouch on ap_detail.cDwcode=salebillvouch.ccuscode and ap_detail.cCoVouchtype=salebillvouch.cvouchtype and ap_detail.cCoVouchid=salebillvouch.csbvcode where cDeptCode is null update ap_detail set cDeptCode=purbillvouch.cdepcode from ap_detail inner join purbillvouch on ap_detail.cDwcode=purbillvouch.cvencode and ap_detail.cCoVouchtype=purbillvouch.cpbvbilltype and ap_detail.cCoVouchid=purbillvouch.cpbvcode where cDeptCode is null 注意做好数据备份。 |