存货记账没反应
发布于:2018-02-05 12:20:44
问题现象:每月在存货中选正常单据记账时全选后点记账后没反应,无法记账必须运行修改存货总帐的工具后即可记账,每月都有此问题。上传的数据是4月份的。帮忙看看是什么原因?
解决方案:--请先做好数据备份! --1.请在当前月未结帐前执行如下语句: delete from ia_summary where imonth>(select max(iperiod)+1 from gl_mend where bflag_ia=1) --2.再用以下语句删除存货总帐重复记录即可 declare @imonth as int set @imonth=0 while @imonth1) ia on ia_summary.cwhcode=ia.cwhcode and ia_summary.cinvcode=ia.cinvcode and ia_summary.imonth=ia.imonth where autoid not in(select min(autoid) from ia_summary where imonth=@imonth group by cwhcode,cinvcode,imonth having count(*)>1) and ia_summary.imonth=@imonth set @imonth=@imonth+1 end