|
问题现象:在用友8.52erp系统中用友U8版本号:U8.52软件的公共平台产品线企业门户模块出现如下问题:在客户档案里将客户编码为1807的客户并到1801客户时,提示:基础档案中使用,不可并户.请帮忙解答!
原因分析:问题分析:1、此问题是由于在升级前委托代销发货单数据写到endispatch(s)表中,升级后将此部分数据写到dispatchlist(s)表中以字段‘cbustype’='委托代销'的形式体现,而升级后委托代销业务数据在endispatch(s)表中还存在记录。2、在并户过程中,程序首先会将源客户编码为1807的字段在各个已使用表中的记录都替换为目标客户编码1801,再修改客户档案1807的总公司为1801的总公司后将1807删除。而在调用到存储过程sp_UniteArchive_Pu时出现错误,没有将endispatch表中的1807客户编码替换为1801,造成在此表中还存在1807的记录,所以后续的操作都将终止。
解决方案:在用友erp 系统版本U8.52软件中解决办法:(请做好数据备份)修改存储过程,将endispatch表中需要并户的客户编码进行更新。请在查询分析器中选择您的账套及当前年度,执行如下存储过程:ALTERPROCEDURE[sp_UniteArchive_Pu]@ArchiveTypevarchar(50),@cDestCodevarchar(20),@cSourceCodevarchar(20)ASif@ArchiveType='vendor'beginupdatepo_poMainsetcVenCode=@cDestCodewherecVencode=@cSourceCodeupdatepurbillvouchsetcVenCode=@cDestCodewherecVencode=@cSourceCodeupdatepurbillvouchsetcUnitcode=@cDestCodewherecUnitcode=@cSourceCodeupdatepurSettlevouchsetcVenCode=@cDestCodewherecVencode=@cSourceCodeupdatePU_AppVouchssetcVenCode=@cDestCodewherecVencode=@cSourceCodeupdatePU_ArrivalVouchsetcVenCode=@cDestCodewherecVencode=@cSourceCodedeleteven_inv_price_ruleitemfromven_inv_price_ruleiteminnerjoinven_inv_price_ruleonven_inv_price_rule.id=ven_inv_price_ruleitem.idandven_inv_price_rule.cvencode=@cSourceCodedeletefromven_inv_price_rulewhereven_inv_price_rule.cvencode=@cSourceCodeupdatepp_ppcdetailssetcVenCode=@cDestCodewherecVencode=@cSourceCodeupdatepp_ppcquotasetcVenCode=@cDestCodewherecVencode=@cSourceCodeupdatepp_productposetcVenCode=@cDestCodewherecVencode=@cSourceCodeendif@ArchiveType='customer'beginupdateSO_SOMainsetcCusCode=@cDestCodewherecCuscode=@cSourceCodeupdatedispatchlistsetcCusCode=@cDestCodewherecCuscode=@cSourceCodeupdateendispatchsetcCusCode=@cDestCodewherecCuscode=@cSourceCodeupdatesalebillvouchsetcCusCode=@cDestCodewherecCuscode=@cSourceCodeupdatesa_settlevouchsetcCusCode=@cDestCodewherecCuscode=@cSourceCodeupdateexpensevouchsetcCusCode=@cDestCodewherecCuscode=@cSourceCodeupdateSA_WrapLeasesetcCusCode=@cDestCodewherecCuscode=@cSourceCodeupdatesalepayvouchsetcCusCode=@cDestCodewherecCuscode=@cSourceCodeupdateSA_QuoMainsetcCusCode=@cDestCodewherecCuscode=@cSourceCodeifexists(selectccuscodefromSA_CusUPricewhereccuscode=@cDestCode)deletefromSA_CusUPricewhereccuscode=@cSourceCodeelseupdateSA_CusUPricesetcCusCode=@cDestCodewherecCuscode=@cSourceCodeifexists(selectccuscodefromSA_ClassDisRatewhereccuscode=@cDestCode)deletefromSA_ClassDisRatewhereccuscode=@cSourceCodeelseupdateSA_ClassDisRatesetcCusCode=@cDestCodewherecCuscode=@cSourceCodeendif@ArchiveType='inventory'beginupdatepo_podetailssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepurbillvouchssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepurbillvouchssetccorinvcode=@cDestCodewherecInvcode=@cSourceCodeupdatepursettlevouchssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepu_appvouchssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepu_arrivalvouchssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepp_ppcdetailssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepp_ppcquotasetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepp_rmrpdetailssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepp_forecastdetailssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepp_pomainsetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdateso_sodetailssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatesalebillvouchssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatesalepayvouchssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdateexpensevouchssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatesa_wrapleasesetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatesa_quodetailssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatesa_settlevouchssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatepricejustifysetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatesa_invupricesetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatesa_cusupricesetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatedispatchlistssetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdateendispatchssetcInvCode=@cDestCodewherecInvCode=@cSourceCodeupdatesa_quantitydisratesetcInvCode=@cDestCodewherecInvcode=@cSourceCodeupdatesa_quodetailssetcInvCode=@cDestCodewherecInvcode=@cSourceCodedeletefromlowlevelwherecinvcode=@cSourceCodeifexists(selectcinvcodefromSA_saleplanwherecinvcode=@cDestCode)deletefromSA_saleplanwherecinvcode=@cSourceCodeelseupdateSA_saleplansetcinvcode=@cDestCodewherecinvcode=@cSourceCodeendGO。
|
|