存貨記賬沒反應(yīng)
發(fā)布于:2018-02-05 12:20:44
問題現(xiàn)象:每月在存貨中選正常單據(jù)記賬時全選后點記賬后沒反應(yīng),無法記賬必須運行修改存貨總帳的工具后即可記賬,每月都有此問題。上傳的數(shù)據(jù)是4月份的。幫忙看看是什么原因?
解決方案:--請先做好數(shù)據(jù)備份! --1.請在當前月未結(jié)帳前執(zhí)行如下語句: delete from ia_summary where imonth>(select max(iperiod)+1 from gl_mend where bflag_ia=1) --2.再用以下語句刪除存貨總帳重復(fù)記錄即可 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