用友U8财务数据降级到T3版本SQL脚本
2022-06-14 04:34:32 已有159人浏览
用友U8财务数据降级到T+3版本SQL脚本 /*手工设置内容:权限以及打印信息,如果U8是账套库不是年度库需要对导入的年度区分,如果在导入过程中期初余额可能对账不平的话,直接做T+3账套的年结就可以,然后在导入凭证,这个没有结算方式,要手工增加下,要不修改凭证就会报错*/ /*旧帐套006导入到新帐套001中*/ delete from [UFDAT+A_001_2013].[dbo].[dsign] delete from [UFDAT+A_001_2013].[dbo].[code] delete from [UFDAT+A_001_2013].[dbo].[Customer] delete from [UFDATA_001_2013].[dbo].[CustomerClass] delete from [UFDATA_001_2013].[dbo].[Department] delete from [UFDATA_001_2013].[dbo].[Person] delete from [UFDATA_001_2013].[dbo].[fitem] delete from [UFDATA_001_2013].[dbo].[fitemss97class] delete from [UFDATA_001_2013].[dbo].[fitemss97] delete from [UFDATA_001_2013].[dbo].[GL_accvouch] delete from [UFDATA_001_2013].[dbo].[GL_accsum] delete from [UFDATA_001_2013].[dbo].[GL_accass] delete from [UFDATA_001_2013].[dbo].[vendorClass] delete from [UFDATA_001_2013].[dbo].[vendor] delete from [UFDATA_001_2013].[dbo].[hr_hi_person] go --插入凭证类别 insert into [UFDATA_001_2013].[dbo].[dsign](csign,isignseq,ctext,itype,iotherused) select csign,isignseq,ctext,itype,iotherused from [ufdata_006_2013].[dbo].[dsign] go --插入凭证类别 --插入会计科目 INSERT INTO [UFDATA_001_2013].[dbo].[code]([cclass], [cclass_engl], [cclassany], [cclassany_engl], [ccode], [ccode_name], [ccode_engl], [igrade], [bproperty], [cbook_type], [cbook_type_engl], [chelp], [cexch_name], [cmeasure], [bperson], [bcus], [bsup], [bdept], [bitem], [cass_item], [br], [be], [cgather], [bend], [bexchange], [bcash], [bbank], [bused], [bd_c], [dbegin], [dend], [itrans], [bclose], [cother], [iotherused], [bcDefine1], [bcDefine2], [bcDefine3], [bcDefine4], [bcDefine5], [bcDefine6], [bcDefine7], [bcDefine8], [bcDefine9], [bcDefine10], [iViewItem], [bGCJS], [bCashItem]) SELECT [cclass], [cclass_engl], [cclassany], [cclassany_engl], [ccode], [ccode_name], [ccode_engl], [igrade], [bproperty], [cbook_type], [cbook_type_engl], [chelp], [cexch_name], [cmeasure], [bperson], [bcus], [bsup], [bdept], [bitem], [cass_item], [br], [be], [cgather], [bend], [bexchange], [bcash], [bbank], [bused], [bd_c], [dbegin], [dend], [itrans], [bclose], [cother], [iotherused], [bcDefine1], [bcDefine2], [bcDefine3], [bcDefine4], [bcDefine5], [bcDefine6], [bcDefine7], [bcDefine8], [bcDefine9], [bcDefine10], [iViewItem], [bGCJS], [bCashItem] FROM [ufdata_006_2013].[dbo].[code] /*where iyear=2015 年度库时使用 */ go --插入会计科目 --客户分类 INSERT INTO [UFDATA_001_2013].[dbo].[CustomerClass]([cCCCode], [cCCName], [iCCGrade], [bCCEnd]) SELECT [cCCCode], [cCCName], [iCCGrade], [bCCEnd] FROM [ufdata_006_2013].[dbo].[CustomerClass] go --客户分类 --客户档案 INSERT INTO [UFDATA_001_2013].[dbo].[Customer] ([cCusCode],[cCusName],[cCusAbbName],[cCCCode],[cDCCode],[cTrade],[cCusAddress],[cCusPostCode],[cCusRegCode], [cCusBank],[cCusAccount],[dCusDevDate],[cCusLPerson],[cCusEmail],[cCusPerson],[cCusPhone],[cCusFax],[cCusBP], [cCusHand],[cCusPPerson],[iCusDisRate],[cCusCreGrade],[iCusCreLine],[iCusCreDate],[cCusPayCond],[cCusOAddress], [cCusOType],[cCusHeadCode],[cCusWhCode],[cCusDepart],[iARMoney],[dLastDate],[iLastMoney],[dLRDate],[iLRMoney], [dEndDate],[iFrequency],[cCusDefine1],[cCusDefine2],[cCusDefine3],[iCostGrade]) SELECT [cCusCode],[cCusName],[cCusAbbName],[cCCCode],[cDCCode],[cTrade],[cCusAddress],[cCusPostCode],[cCusRegCode], [cCusBank],[cCusAccount],[dCusDevDate],[cCusLPerson],[cCusEmail],[cCusPerson],[cCusPhone],[cCusFax],[cCusBP], [cCusHand],[cCusPPerson],[iCusDisRate],[cCusCreGrade],[iCusCreLine],[iCusCreDate],[cCusPayCond],[cCusOAddress], [cCusOType],[cCusHeadCode],[cCusWhCode],[cCusDepart],[iARMoney],[dLastDate],[iLastMoney],[dLRDate],[iLRMoney], [dEndDate],[iFrequency],[cCusDefine1],[cCusDefine2],[cCusDefine3],[iCostGrade] FROM [ufdata_006_2013].[dbo].[Customer] go --供应商分类 insert into [ufdata_001_2013].[dbo].[vendorclass]( cVCCode,cVCName,iVCGrade,bVCEnd) select cVCCode,cVCName,iVCGrade,bVCEnd from [ufdata_006_2013].[dbo].[vendorclass] go --供应商分类 --供应商档案 INSERT INTO [UFDATA_001_2013].[dbo].[Vendor]( [cVenCode],[cVenName],[cVenAbbName],[cVCCode],[cDCCode],[cTrade],[cVenAddress],[cVenPostCode],[cVenRegCode],[cVenBank], [cVenAccount],[dVenDevDate],[cVenLPerson],[cVenPhone],[cVenFax],[cVenEmail],[cVenPerson],[cVenBP],[cVenHand],[cVenPPerson], [iVenDisRate],[iVenCreGrade],[iVenCreLine],[iVenCreDate],[cVenPayCond],[cVenIAddress],[cVenIType],[cVenHeadCode],[cVenWhCode], [cVenDepart],[iAPMoney],[dLastDate],[iLastMoney],[dLRDate],[iLRMoney],[dEndDate],[iFrequency],[bVenTax],[cVenDefine1], [cVenDefine2],[cVenDefine3]) SELECT [cVenCode],[cVenName],[cVenAbbName],[cVCCode],[cDCCode],[cTrade],[cVenAddress],[cVenPostCode],[cVenRegCode],[cVenBank], [cVenAccount],[dVenDevDate],[cVenLPerson],[cVenPhone],[cVenFax],[cVenEmail],[cVenPerson],[cVenBP],[cVenHand],[cVenPPerson], [iVenDisRate],[iVenCreGrade],[iVenCreLine],[iVenCreDate],[cVenPayCond],[cVenIAddress],[cVenIType],[cVenHeadCode],[cVenWhCode], [cVenDepart],[iAPMoney],[dLastDate],[iLastMoney],[dLRDate],[iLRMoney],[dEndDate],[iFrequency],[bVenTax],[cVenDefine1], [cVenDefine2],[cVenDefine3] FROM [ufdata_006_2013].[dbo].[Vendor] go --供应商档案 --部门档案 INSERT INTO [UFDATA_001_2013].[dbo].[Department] ([cDepCode], [bDepEnd], [cDepName], [iDepGrade], [cDepPerson], [cDepProp], [cDepPhone], [cDepAddress], [cDepMemo]) SELECT [cDepCode], [bDepEnd], [cDepName], [iDepGrade], [cDepPerson], [cDepProp], [cDepPhone], [cDepAddress], [cDepMemo] FROM [ufdata_006_2013].[dbo].[Department] go INSERT INTO [UFDATA_001_2013].[dbo].[fa_Departments] (sNum,sName,sParentNum,sNum1,bSumDepr,iLevel,iDefinetype) select cdepcode,cdepname,'',cdepcode,1,1,1 from [UFDATA_001_2013].[dbo].[department] go --部门档案 --职员档案 INSERT INTO [UFDATA_001_2013].[dbo].[Person]( [cPersonCode], [cPersonName], [cDepCode], [cPersonProp]) SELECT [cPersonCode], [cPersonName], [cDepCode], [cPersonProp] FROM [ufdata_006_2013].[dbo].[Person] go --职员档案
--项目大类 insert into [UFDATA_001_2013].[dbo].[fitem](citem_class,citem_name,citem_text,crule,ctable,cclasstable) select citem_class,citem_name,citem_text,crule,ctable,cclasstable from [ufdata_006_2013].[dbo].[fitem] go --项目大类 --项目分类 insert into [UFDATA_001_2013].[dbo].[fitemss97class]( cItemCcode,cItemCname,iItemCgrade,bItemCend) select cItemCcode,cItemCname,iItemCgrade,bItemCend from [ufdata_006_2013].[dbo].[fitemss97class] go --项目分类 --项目档案 insert into [UFDATA_001_2013].[dbo].[fitemss97]( citemcode,citemname,bclose,citemccode,iotherused,dEndDate) select citemcode,citemname,bclose,citemccode,iotherused,dEndDate from [ufdata_006_2013].[dbo].[fitemss97] go --项目档案
--凭证 INSERT INTO [UFDATA_001_2013].[dbo].[GL_accvouch]( [iperiod], [csign], [isignseq], [ino_id], [inid], [dbill_date], [idoc], [cbill], [ccheck], [cbook], [ibook], [ccashier], [iflag], [ctext1], [ctext2], [cdigest], [ccode], [cexch_name], [md], [mc], [md_f], [mc_f], [nfrat], [nd_s], [nc_s], [csettle], [cn_id], [dt_date], [cdept_id], [cperson_id], [ccus_id], [csup_id], [citem_id], [citem_class], [cname], [ccode_equal], [iflagbank], [iflagPerson], [bdelete], [coutaccset], [ioutyear], [coutsysname], [coutsysver], [doutbilldate], [ioutperiod], [coutsign], [coutno_id], [doutdate], [coutbillsign], [coutid], [bvouchedit], [bvouchAddordele], [bvouchmoneyhold], [bvalueedit], [bcodeedit], [ccodecontrol], [bPCSedit], [bDeptedit], [bItemedit], [bCusSupInput], [cDefine1], [cDefine2], [cDefine3], [cDefine4], [cDefine5], [cDefine6], [cDefine7], [cDefine8], [cDefine9], [cDefine10]) SELECT [iperiod], [csign], [isignseq], [ino_id], [inid], [dbill_date], [idoc], [cbill], [ccheck], [cbook], [ibook], [ccashier], [iflag], [ctext1], [ctext2], [cdigest], [ccode], [cexch_name], [md], [mc], [md_f], [mc_f], [nfrat], [nd_s], [nc_s], [csettle], [cn_id], [dt_date], [cdept_id], [cperson_id], [ccus_id], [csup_id], [citem_id], [citem_class], [cname], [ccode_equal], [iflagbank], [iflagPerson], [bdelete], [coutaccset], [ioutyear], [coutsysname], [coutsysver], [doutbilldate], [ioutperiod], [coutsign], [coutno_id], [doutdate], [coutbillsign], [coutid], [bvouchedit], [bvouchAddordele], [bvouchmoneyhold], [bvalueedit], [bcodeedit], [ccodecontrol], [bPCSedit], [bDeptedit], [bItemedit], [bCusSupInput], [cDefine1], [cDefine2], [cDefine3], [cDefine4], [cDefine5], [cDefine6], [cDefine7], [cDefine8], [cDefine9], [cDefine10] FROM [ufdata_006_2013].[dbo].[GL_accvouch] /*where iyear=2015 年度库时使用 */ go --凭证 --凭证1 INSERT INTO [UFDATA_001_2013].[dbo].[GL_accsum]( [ccode], [cexch_name], [iperiod], [cbegind_c], [cbegind_c_engl], [mb], [md], [mc], [cendd_c], [cendd_c_engl], [me], [mb_f], [md_f], [mc_f], [me_f], [nb_s], [nd_s], [nc_s], [ne_s]) SELECT [ccode], [cexch_name], [iperiod], [cbegind_c], [cbegind_c_engl], [mb], [md], [mc], [cendd_c], [cendd_c_engl], [me], [mb_f], [md_f], [mc_f], [me_f], [nb_s], [nd_s], [nc_s], [ne_s] FROM [ufdata_006_2013].[dbo].[GL_accsum] /*where iyear=2015 年度库时使用 */ go --凭证1 --凭证2 INSERT INTO [UFDATA_001_2013].[dbo].[GL_accass]( [ccode], [cexch_name], [cdept_id], [cperson_id], [ccus_id], [csup_id], [citem_class], [citem_id], [iperiod], [cbegind_c], [cbegind_c_engl], [mb], [md], [mc], [cendd_c], [cendd_c_engl], [me], [mb_f], [md_f], [mc_f], [me_f], [nb_s], [nd_s], [nc_s], [ne_s]) SELECT [ccode], [cexch_name], [cdept_id], [cperson_id], [ccus_id], [csup_id], [citem_class], [citem_id], [iperiod], [cbegind_c], [cbegind_c_engl], [mb], [md], [mc], [cendd_c], [cendd_c_engl], [me], [mb_f], [md_f], [mc_f], [me_f], [nb_s], [nd_s], [nc_s], [ne_s] FROM [ufdata_006_2013].[dbo].[GL_accass] /*where iyear=2015 年度库时使用 */ go --凭证2 ---更新结帐标记为记帐 UPDATE [UFDATA_001_2013].dbo.GL_mend SET bflag='True' go ---更新结帐标记为记帐 --现金流量 delete from [UFDATA_001_2013].[dbo].[GL_CashTable] go INSERT INTO [UFDATA_001_2013].[dbo].[GL_CashTable]( [iPeriod], [iSignSeq], [iNo_id], [inid], [cCashItem], [md], [mc]) select a.iperiod,a.isignseq,a.ino_id,a.inid,b.cCashItem,b.md,b.mc from [ufdata_006_2013].[dbo].[GL_accvouch] a,[ufdata_006_2013].[dbo].[GL_CashTable] b where a.iperiod=b.iperiod and a.isignseq=b.isignseq and a.iNo_id=b.iNo_id and a.inid=b.inid go --现金流量
下一篇:T3一个月内多次发放工资
相关内容
-
怎么提高仓库内运行效率?青岛用友来告诉你!
-
年底了,仓库盘点方式及注意事项,你知道多少?
为什么要盘点资产核实与销售保证,盘点就是核实企业的资产,盘点的数据会影响到销售,影响到生产,它是生产和销售的保证。不断收发使库存数量易出错,账卡物常不符。因为不···
-
哪些KPI指标适用于第三方物流仓储管理?
对于第三方物流来说,仓库管理水平直接影响着业务的成败。很多第三方物流企业对于仓库管理方面缺乏一定的认识,基本都是照搬一些其他仓库管理指标直接使用,导致在管理上根···
-
预算管理、资金保障...集团财务如何实现数据智能应用?
随着大数据、云计算、AI等数字科技的不断发展,企业内外部环境正发生着翻天覆地的变化。如何在剧烈变化的市场环境中快速识别风险、调整经营策略,已经成为企业生存和发展的···
-
多地分仓管理,如何做好调拨工作?
当企业产品越来越多,所需库房越来越大,尤其全国各地有分库的企业,其库房之间的库存分配成了一项重要的业务环节。库存调拨就是各个库房之间库存供给和消化能力的不均衡所···