- 打卡等级:无名新人
- 打卡总天数:1
- 打卡月天数:0
- 打卡总奖励:1
- 最近打卡:2024-10-28 15:48:47
|
发表于 2019-6-5 20:01:08
|
显示全部楼层
18.以前是双凭证模式,怎么调整为单凭证模式
解决方法:(有问题请使用单凭证模式,尽量不使用双凭证模式,研发不再支持双凭证模式。历史数据调整脚本如下)
--双凭证改单凭证解决办法
--执行以下操作前,请做好数据备份。严格按以下顺序进行操作。
--替换星号为实际的单位代码和账套号
--1、修改账套
update gl_ztcs set pxjzfs='1' where hsdwdm='***' and ztbh='***' and kjnd = '2019' and sfpxjz='1' and pxjzfs='2';
--2、确认账套是否存在可用凭证类型(如记账),没有则增加。
--3、修改凭证数据
--1)修改预算会计分录
update gl_pznr set pzlxdm='记账',
pzh= (select max(pzh) from gl_pznr n where idpzh in (select cwidpzh from gl_pzgroup where ysidpzh=gl_pznr.idpzh)),
flh=((select max(flh) from gl_pznr n where idpzh in (select cwidpzh from gl_pzgroup where ysidpzh=gl_pznr.idpzh))+gl_pznr.flh),
idpzh= (select cwidpzh from gl_pzgroup where ysidpzh=gl_pznr.idpzh)
where gsdm='***' and zth='***' and kjqj like '2019%' and kjtxdm='02'
and exists(select 1 from gl_pzgroup where ysidpzh=gl_pznr.idpzh and cwidpzh is not null and cwidpzh <> '');
update gl_pzflmx set pzlxdm='记账',
pzh=(select pzh from gl_pznr n where idpznr=gl_pzflmx.idpznr),
flh=(select flh from gl_pznr n where idpznr=gl_pzflmx.idpznr),
idpzh=(select idpzh from gl_pznr n where idpznr=gl_pzflmx.idpznr)
where gsdm='***' and zth='***' and kjqj like '2019%' and kjtxdm='02';
--2)修改财务会计分录
update gl_pznr set pzlxdm='记账'
where gsdm='***' and zth='***' and kjqj like '2019%' and kjtxdm='01';
update gl_pzflmx set pzlxdm='记账'
where gsdm='***' and zth='***' and kjqj like '2019%' and kjtxdm='01';
--3)修改凭证目录
update gl_pzml set pzlxdm='记账',
kjtxdm='',
yspzje=isnull((select pzje from gl_pzml m where idpzh in (select ysidpzh from gl_pzgroup where cwidpzh=gl_pzml.idpzh)), 0)
where gsdm='***' and zth='***' and kjqj like '2019%' and kjtxdm='01';
--4)删除预算会计
delete from gl_pzml
where gsdm='***' and zth='***' and kjqj like '2019%' and kjtxdm='02';
update gl_pzgroup set ysidpzh=null
where gsdm='***' and zth='***' and kjqj like '2019%';
--4、退出U8系统,重新登录系统,验证结果。 |
|