找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 58|回复: 0

结转期间损益多出1块钱

[复制链接]
发表于 2023-10-14 18:40:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
T+-总账

               
                    【问题现象】结转损益多出1块钱
【解决方案】:期间损益结转不含辅助项的科目,GL_Journal表里如果辅助项有值,会导致期间损益结转总是多1元
您好,请备份好账套数据,执行以下脚本:
--更新凭证表
update GL_Journal set idauxAccDepartment=null
where idaccount in (select id from AA_Account where isauxaccdepartment=0)
and idauxAccDepartment is not null
update GL_Journal set idauxAccInventory=null
where idaccount in (select id from AA_Account where isauxaccinventory=0)
and idauxAccInventory is not null
update GL_Journal set idauxAccCustomer=null
where idaccount in (select id from AA_Account where isauxacccustomer=0)
and idauxAccCustomer is not null
update GL_Journal set idauxAccSupplier=null
where idaccount in (select id from AA_Account where isauxaccsupplier=0)
and idauxAccSupplier is not null
update GL_Journal set idauxAccPerson=null
where idaccount in (select id from AA_Account where isauxaccperson=0)
and idauxAccPerson is not null
update GL_Journal set idauxAccProject=null
where idaccount in (select id from AA_Account where isauxaccproject=0)
and idauxAccProject is not null
update GL_Journal set idexauxacc1=null
where idaccount in (select id from AA_Account where isexauxacc1=0)
and idexauxacc1 is not null
update GL_Journal set idexauxacc2=null
where idaccount in (select id from AA_Account where isexauxacc2=0)
and idexauxacc2 is not null
update GL_Journal set idexauxacc3=null
where idaccount in (select id from AA_Account where isexauxacc3=0)
and idexauxacc3 is not null
update GL_Journal set idexauxacc4=null
where idaccount in (select id from AA_Account where isexauxacc4=0)
and idexauxacc4 is not null
update GL_Journal set idexauxacc5=null
where idaccount in (select id from AA_Account where isexauxacc5=0)
and idexauxacc5 is not null
update GL_Journal set idexauxacc6=null
where idaccount in (select id from AA_Account where isexauxacc6=0)
and idexauxacc6 is not null
update GL_Journal set idexauxacc7=null
where idaccount in (select id from AA_Account where isexauxacc7=0)
and idexauxacc7 is not null
update GL_Journal set idexauxacc8=null
where idaccount in (select id from AA_Account where isexauxacc8=0)
and idexauxacc8 is not null
update GL_Journal set idexauxacc9=null
where idaccount in (select id from AA_Account where isexauxacc9=0)
and idexauxacc9 is not null
update GL_Journal set idexauxacc10=null
where idaccount in (select id from AA_Account where isexauxacc10=0)
and idexauxacc10 is not null
--更新凭证的辅助项表
update  GL_AuxiliaryInfo set idauxAccDepartment=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isauxaccdepartment=0 )
) and idauxAccDepartment is not null
update  GL_AuxiliaryInfo set idauxAccInventory=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isauxaccinventory=0 )
) and idauxAccInventory is not null
  update  GL_AuxiliaryInfo set idauxAccCustomer=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isauxacccustomer=0 )
) and idauxAccCustomer is not null
  update  GL_AuxiliaryInfo set idauxAccPerson=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isauxaccperson=0 )
) and idauxAccPerson is not null
  update  GL_AuxiliaryInfo set idauxAccProject=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isauxaccproject=0 )
) and idauxAccProject is not null
  update  GL_AuxiliaryInfo set idexauxacc1=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc1=0 )
) and idexauxacc1 is not null
   update  GL_AuxiliaryInfo set idexauxacc2=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc2=0 )
) and idexauxacc2 is not null
   update  GL_AuxiliaryInfo set idexauxacc3=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc3=0 )
) and idexauxacc3 is not null
   update  GL_AuxiliaryInfo set idexauxacc4=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc4=0 )
) and idexauxacc4 is not null
   update  GL_AuxiliaryInfo set idexauxacc5=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc5=0 )
) and idexauxacc5 is not null
   update  GL_AuxiliaryInfo set idexauxacc6=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc6=0 )
) and idexauxacc6 is not null
   update  GL_AuxiliaryInfo set idexauxacc7=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc7=0 )
) and idexauxacc7 is not null
   update  GL_AuxiliaryInfo set idexauxacc8=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc8=0 )
) and idexauxacc8 is not null
   update  GL_AuxiliaryInfo set idexauxacc9=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc9=0 )
) and idexauxacc9 is not null
   update  GL_AuxiliaryInfo set idexauxacc10=null where
id in (select  auxiliaryinfoid from GL_Journal where idaccount in (select id from AA_Account where isexauxacc10=0 )
) and idexauxacc10 is not null
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-5-20 16:37 , Processed in 0.033444 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表