|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
【业务场景】: 总账--账簿打印,不勾选‘科目无期初余额,本年无发生也打印’,但是无数据的科目也被打印出来
【解决方案】:
请备份好账套数据,再执行脚本:
-- 修正语句
--删除journal
delete FROM GL_Journal where isPeriodBegin=1 and docid in(
select id from GL_AccountPeriodBegin
where id not in ( SELECT idAccountPeriodBeginDTO FROM GL_AccountPeriodBeginDetail)
and isnull(periodbeginbalanceorigamount,0)=0
and isnull(yearbeginbalanceorigamount,0)=0
and isnull(cumorigamountcr,0)=0
and isnull(cumamountdr,0)=0
and isnull(periodbeginbalancequantity,0) = 0
and isnull(yearbeginbalancequantity,0)=0
and isnull(cumquantitycr,0)=0
and isnull(cumquantitydr,0)=0
)
--删除科目期初
delete from GL_AccountPeriodBegin
where id not in ( SELECT idAccountPeriodBeginDTO FROM GL_AccountPeriodBeginDetail)
and isnull(periodbeginbalanceorigamount,0)=0
and isnull(yearbeginbalanceorigamount,0)=0
and isnull(cumorigamountcr,0)=0
and isnull(cumamountdr,0)=0
and isnull(periodbeginbalancequantity,0) = 0
and isnull(yearbeginbalancequantity,0)=0
and isnull(cumquantitycr,0)=0
and isnull(cumquantitydr,0)=0
【操作步骤】:备份好账套数据,打开数据库,选择对应的账套库,执行脚本
|
|