找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

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

固定资产10月份不能计提折旧

[复制链接]
发表于 2009-2-5 01:48:38 | 显示全部楼层 |阅读模式
U8知识库
问题号: 5427
解决状态: 临时解决方案
软件版本: 8.52
软件模块: 固定资产
行业: 通用
关键字: 折旧
适用产品: 852
问题名称: 固定资产10月份不能计提折旧
问题现象: 固定资产10月份不能计提折旧,折旧中断
问题原因: fa_cards和fa_DeprTransactions数据紊乱
解决方案: 数据库中有数据丢失,由于按单部门折旧,可做如下修改:
一、增加fa_cards_detail表中的数据(由fa_cards表获得):
1.将fa_cards中的数据插入临时表,以便生成自增字段:
select identity(int, 1,1) as

sid,scardid,scardnum,sdeptnum,loptid,ddisposedate,iDisposePeriod,dblvalue,dbldecdeprt,dblbv,dblcanwork,
dbltransindeprtcard,dbltransoutdeprtcard,dbldecprevaluet,dblretdecprevaluet,dblBuildArea,lBuildNum,
lMachinNum,dblMachinW
into temptable
from fa_cards

2.由临时表插入fa_cards_detail:
set identity_insert fa_cards_detail on

insert into fa_cards_detail

(sid,scardid,scardnum,sdeptnum,loptid,ddisposedate,iDisposePeriod,dblvalue,dbldecdeprt,dblbv,dblcanwork,
dbltransindeprtcard,dbltransoutdeprtcard,dbldecprevaluet,dblretdecprevaluet,dblBuildArea,lBuildNum,
lMachinNum,dblMachinW)
select
sid,scardid,scardnum,sdeptnum,loptid,ddisposedate,iDisposePeriod,dblvalue,dbldecdeprt,dblbv,dblcanwork,
dbltransindeprtcard,dbltransoutdeprtcard,dbldecprevaluet,dblretdecprevaluet,dblBuildArea,lBuildNum,
lMachinNum,dblMachinW
from temptable

set identity_insert fa_cards_detail off

3.删除临时表
drop table temptable

二、补全fa_DeprTransactions_Detail表中的数据:
1.将fa_DeprTransactions中的数据插入临时表,以便生成自增字段:

select IDENTITY(int, 1, 1) AS sid ,
fa_DeprTransactions.[sCardNum], [sDeptNum], [dblDepr1], [dblDeprT1], [dblDepr2],
[dblDeprT2], [dblDepr3], [dblDeprT3], [dblDepr4], [dblDeprT4], [dblDepr5],
[dblDeprT5], [dblDepr6], [dblDeprT6], [dblDepr7], [dblDeprT7], [dblDepr8],
[dblDeprT8], [dblDepr9], [dblDeprT9], [dblDepr10], [dblDeprT10], [dblDepr11],
[dblDeprT11], [dblDepr12], [dblDeprT12], [dblMonthValue1], [dblMonthValue2],
[dblMonthValue3], [dblMonthValue4], [dblMonthValue5], [dblMonthValue6],
[dblMonthValue7], [dblMonthValue8], [dblMonthValue9], [dblMonthValue10],
[dblMonthValue11], [dblMonthValue12], [dblDeprThisYear]
into temptable
from fa_DeprTransactions left outer join (select distinct scardNum,sdeptnum from fa_cards) a on
fa_DeprTransactions.scardnum = a.scardnum

2.由临时表插入fa_DeprTransactions_Detail :
set identity_insert fa_DeprTransactions_Detail on

insert into fa_DeprTransactions_Detail (sid ,
[sCardNum], [sDeptNum], [dblDepr1], [dblDeprT1], [dblDepr2],
[dblDeprT2], [dblDepr3], [dblDeprT3], [dblDepr4], [dblDeprT4], [dblDepr5],
[dblDeprT5], [dblDepr6], [dblDeprT6], [dblDepr7], [dblDeprT7], [dblDepr8],
[dblDeprT8], [dblDepr9], [dblDeprT9], [dblDepr10], [dblDeprT10], [dblDepr11],
[dblDeprT11], [dblDepr12], [dblDeprT12], [dblMonthValue1], [dblMonthValue2],
[dblMonthValue3], [dblMonthValue4], [dblMonthValue5], [dblMonthValue6],
[dblMonthValue7], [dblMonthValue8], [dblMonthValue9], [dblMonthValue10],
[dblMonthValue11], [dblMonthValue12],[dblMonthValue13], [dblDeprThisYear] )
select sid ,
[sCardNum], [sDeptNum], [dblDepr1], [dblDeprT1], [dblDepr2],
[dblDeprT2], [dblDepr3], [dblDeprT3], [dblDepr4], [dblDeprT4], [dblDepr5],
[dblDeprT5], [dblDepr6], [dblDeprT6], [dblDepr7], [dblDeprT7], [dblDepr8],
[dblDeprT8], [dblDepr9], [dblDeprT9], [dblDepr10], [dblDeprT10], [dblDepr11],
[dblDeprT11], [dblDepr12], [dblDeprT12], [dblMonthValue1], [dblMonthValue2],
[dblMonthValue3], [dblMonthValue4], [dblMonthValue5], [dblMonthValue6],
[dblMonthValue7], [dblMonthValue8], [dblMonthValue9], [dblMonthValue10],
[dblMonthValue11], [dblMonthValue12],[dblMonthValue12], [dblDeprThisYear]
from temptable

set identity_insert fa_DeprTransactions_Detail off

3.删除临时表
drop table temptable
补丁编号:
录入日期: 2005-6-28
最后更新时间:

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

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

×
固定资产10月份不能计提折旧,折旧中断
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

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

GMT+8, 2025-8-3 08:26 , Processed in 0.060040 second(s), 12 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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