解决用友U8固定资产对账不平

上传人:飞*** 文档编号:12457097 上传时间:2017-10-19 格式:DOC 页数:4 大小:80.50KB
返回 下载 相关 举报
解决用友U8固定资产对账不平_第1页
第1页 / 共4页
解决用友U8固定资产对账不平_第2页
第2页 / 共4页
解决用友U8固定资产对账不平_第3页
第3页 / 共4页
解决用友U8固定资产对账不平_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《解决用友U8固定资产对账不平》由会员分享,可在线阅读,更多相关《解决用友U8固定资产对账不平(4页珍藏版)》请在金锄头文库上搜索。

1、begin TRANSACTION kk-创建临时表CREATE TABLE #fq(sCardID int ,PRIMARY key nonCLUSTERED (sCardID) commit TRANSACTION kk-初始化定义变量declare Begin datetime,end datetime,iperiod int, acc_id varchar(10), acc_year varchar(10)declare SQL nchar(2000)-得到当前本数据库的有关信息select acc_id=999, acc_year=2013, iperiod=1,Begin=2013

2、-01-01 00:00:00.000, end=2013-01-31 00:00:00.000-修改成需要重算总账的相关信息-SELECT Begin=dBegin, end =dEndFROM UFSystem.dbo.UA_Period - where cAcc_Id=acc_id and iYear =acc_year and iId=iperiod-Select acc_id,acc_year,iperiod,Begin,end-取月初有效卡片序号数据,计算月初累计折旧数据if iperiod12 returninsert #fq SELECT max(C.sCardID)FROM

3、fa_Cards CWHERE (c.dInputDate isnull(DT,0) or T.dblMonthvalue isnull(DT,0) or t.dblDeprisnull(Dv,0) and T.iperiod=iperiodtruncate table #fq-取本月新增或变动有效卡片序号数据,计算本月折旧变动情况insert #fq SELECT C.sCardIDFROM fa_Cards C WHERE (c.dInputDate between begin and end) or (c.dTransDate between begin and end)or (c.dD

4、isposeDate between begin and end) update fa_totalset dblTransInDeprTotal=indt,dblTransOutDeprTotal=(outdt)FROM fa_total T left join (Select D.sDeptNum,C.sTypeNum,sum(d.dblTransInDeprTCard) inDt,sum(d.dblTransOutDeprTCard+ case when c.iopttypeisnull(outdt,0) or dblTransInDeprTotalisnull(indt,0)drop table #fq

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 其它文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号