科目数据清理方案
一、 方案场景
现场科目分配错误,需要反分配,但是提示科目被业务数据引用。
二、 前置条件
此科目的业务数据已经完全清理完毕包含但不限于以下内容:无凭证,无模式凭证,无自动转账模板、无初始化数据(科目余额初始化、现金流量初始化、往来账初始化)如有因未清理完数据,执行了脚本导致的数据问题需要现场修复。
清理前需要备份账套。
三、 清理脚本
1. 获取科目的FID
组织的FID:select fid from t_org_company where fnumber = 组织的编码
科目的FID:select fid from t_bd_accountview where fnumber = 科目编码 and fcompanyid = '组织的FID'
2. 清理余额记录
delete from t_gl_accountbalance where faccountid = '科目的FID' delete from t_gl_assistbalance where faccountid = '科目的FID'
delete from t_gl_assistmeasurebalance where faccountid = '科目的FID'
delete from t_gl_initaccountbalance where faccountid = '科目的FID'
delete from t_gl_initassistbalance where faccountid = '科目的FID'
delete from t_gl_flag where fkeyid = '科目的FID'
3. 清理现金流量
--7.5以上版本才有
Delete from t_gl_cashflowrecord where faccountid = '科目的FID'
--7.5以上版本才有
Delete from t_gl_cashflowrecord where foppaccountid = '科目的FID'
--7.5以上版本才有
Delete from t_gl_cashflowsplitrecord where faccountid = '科目的FID'
--7.5以上版本才有
Delete from t_gl_cashflowsplitrecord where foppaccountid = '科目的FID'
4. 清理往来核销数据
Delete from t_gl_acctcussent where faccountid = '科目的FID'
Delete from T_GL_AcctCussentHistory where faccountid = '科目的FID'
5. 清理往来通知数据
Delete from T_CSL_RequisitionEntry where faccountid = '科目的FID'
6. 清理科目自定义属性
delete from t_gl_assistcustomizedproperty where faccountid = '科目的FID'
科目数据清理方案
本文2024-09-16 22:26:55发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-48183.html
- 鼎捷EAI整合規範文件V3.1.07 (集團).pdf
- 鼎捷OpenAPI應用場景說明_基礎資料.pdf
- 鼎捷OpenAPI應用場景說明_財務管理.pdf
- 鼎捷T100 API設計器使用手冊T100 APIDesigner(V1.0).docx
- 鼎新e-GoB2雲端ERP B2 線上課程E6-2應付票據整批郵寄 領取.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程A4使用者建立權限設定.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程C3會計開帳與會計傳票.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程E6-1應付票據.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程A5-1進銷存參數設定(初階篇).pdf
- 鼎新e-GoB2雲端ERP B2 線上課程D2帳款開帳與票據開帳.pdf